These are chat archives for collectiveaccess/support

21st
Dec 2018
Se7en
@Se7en-IT
Dec 21 2018 14:57
Hi, how can I remove all relations from search_indexing.conf?
At the moment I have very serious performance issue about it, thank you
Julia
@juliaweist
Dec 21 2018 15:17
Relationships are entered as blocks within each table designation in search_indexing.conf. So, for example, within ca_objects = {
you will have # ------------------------------------
ca_entities = {
make sure to rebuild your search index after you make changes or they won't take effect
Se7en
@Se7en-IT
Dec 21 2018 15:18
ok thanks
but what is this block?
ca_entities = {
tables = {
entities = [ca_objects_x_entities],
object_lots = [ca_object_lots, ca_object_lots_x_entities]
},
fields = {
entity_id = { DONT_INCLUDE_IN_SEARCH_FORM },
idno = { STORE, DONT_TOKENIZE, INDEX_AS_IDNO, BOOST = 100 },
_count = { }
}
},
tables.object_lots
what does it mean?
and INDEX_ANCESTORS what does it mean?
do you have an example for simple indexing only metadata and label of object/entity/occurrence?
Julia
@juliaweist
Dec 21 2018 16:45
INDEX_ANCESTORS - (enables hierarchical indexing for field, assuming it is in an hierarchical table, resulting in all values for this field in records above the subject in the hierarchy being indexing against the subject)
Removing parts of the search index may cause issues for your cataloguers if they are working with other tables, sets, list items etc.
that being said, here's an example as you've requested:

ca_objects = {

# ------------------------------------
ca_objects = {
    fields = {
        object_id = { },
        _metadata = { },                    # forces indexing of all attributes
        parent_id = {STORE, DONT_TOKENIZE, DONT_INCLUDE_IN_SEARCH_FORM },
        source_id = {},
        lot_id = { DONT_INCLUDE_IN_SEARCH_FORM },
        idno = { STORE, DONT_TOKENIZE, INDEX_AS_IDNO, BOOST = 100 },    
        type_id = { STORE, DONT_TOKENIZE },
        source_id = { STORE, DONT_TOKENIZE },
        acquisition_type_id = { STORE, DONT_TOKENIZE },
        hier_object_id = { STORE, DONT_TOKENIZE },
        access = { STORE, DONT_TOKENIZE },
        status = { STORE, DONT_TOKENIZE },
        deleted = { STORE, DONT_TOKENIZE },
        is_deaccessioned = { STORE, DONT_TOKENIZE },
        deaccession_notes = {},
        deaccession_date = {},
        circulation_status_id = { STORE, DONT_TOKENIZE }
    },
    # Index idno's of related objects 
    related = {
        fields = {
            idno = { STORE, DONT_TOKENIZE, INDEX_AS_IDNO, BOOST = 100 }
        }
    }
},
# ------------------------------------
ca_object_labels = {
    key = object_id,
    fields = {
        name = { BOOST = 100, INDEX_ANCESTORS, INDEX_ANCESTORS_START_AT_LEVEL = 0, INDEX_ANCESTORS_MAX_NUMBER_OF_LEVELS = 4, INDEX_ANCESTORS_AS_PATH_WITH_DELIMITER = . },
        name_sort = { DONT_INCLUDE_IN_SEARCH_FORM },
        _count = {}
    },
    # Index names of related objects
    related = {
        fields = {
            name = { BOOST = 100, INDEX_ANCESTORS, INDEX_ANCESTORS_START_AT_LEVEL = 0, INDEX_ANCESTORS_MAX_NUMBER_OF_LEVELS = 4, INDEX_ANCESTORS_AS_PATH_WITH_DELIMITER = . }
        }
    } 
},
# ------------------------------------
ca_objects_x_entities = {
    key = object_id,
    fields = {
        _count = { }
    }
},
# ------------------------------------
ca_entities = {
    tables = {
        entities = [ca_objects_x_entities],
        object_lots = [ca_object_lots, ca_object_lots_x_entities]
    },
    fields = {
        entity_id = { DONT_INCLUDE_IN_SEARCH_FORM },
        idno = { STORE, DONT_TOKENIZE, INDEX_AS_IDNO, BOOST = 100 },
        _count = { }
    }
},
# ------------------------------------
ca_entity_labels = {
    tables = {
        entities = {
            ca_objects_x_entities = { }, 
            ca_entities = {}
        },
        object_lots = [ca_object_lots, ca_object_lots_x_entities, ca_entities],
        annotations = [ca_objects_x_object_representations, ca_object_representations, ca_representation_annotations, ca_representation_annotations_x_entities, ca_entities]
    },
    fields = {
        entity_id = { DONT_INCLUDE_IN_SEARCH_FORM },
        displayname = { },
        forename = {},
        surname = {},
        middlename = {}
    }
},
# ------------------------------------
ca_storage_locations = {
    tables = {
        places = [ca_objects_x_storage_locations],
    },
    fields = {
        location_id = { DONT_INCLUDE_IN_SEARCH_FORM },
        idno = { STORE, DONT_TOKENIZE, INDEX_AS_IDNO, BOOST = 100 }
    }
},
# ------------------------------------
ca_storage_location_labels = {
    tables = {
        places = [ca_objects_x_storage_locations, ca_storage_locations]
    },
    fields = {
        location_id = { DONT_INCLUDE_IN_SEARCH_FORM },
        name = { INDEX_ANCESTORS, INDEX_ANCESTORS_START_AT_LEVEL = 0, INDEX_ANCESTORS_MAX_NUMBER_OF_LEVELS = 10, INDEX_ANCESTORS_AS_PATH_WITH_DELIMITER = .}
    }
},
# ------------------------------------

}

Se7en
@Se7en-IT
Dec 21 2018 17:08
@juliaweist thank a lot!
this setting indexes related ca_entities and ca_storage_locations
is it correct?
Julia
@juliaweist
Dec 21 2018 18:17
yes
Se7en
@Se7en-IT
Dec 21 2018 19:32
Perfect
Thanks a lot:-D