User Tools

Site Tools


en:user:partition_indexes

Partition Indexes

Indexes are built on particular text or metadata sources. The search space can be further controlled by partitioning the indexes, either by language or by a predetermined filter. Partition indexes can be set in the "Partition Indexes" section under the Design panel.

The "Partition Indexes" view has three tabs; "Define Filters", "Assign Partitions" and "Assign Languages".

Note that for MG collections, the total number of partitions generated is a combination of all indexes, sub-collection filters and languages chosen. Two indexes with two sub-collection filters in two languages would yield eight index partitions. For MGPP, all indexes are created in one physical index, so there would only be four index partitions. For Lucene, the number of physical indexes is determined by the number of levels assigned to the collection, one index per level. So for the above situation, one level would result in four physical indexes, while two levels would result in eight.

Define Filters

Filters allow you to group together into a sub-collection all documents in an index for which a metadata value matches a given pattern.

To create a filter, click the "Define Filters" tab and enter a name for the new filter into the "Subcollection filter name:" field. Next choose a document attribute to match against, either a metadata element or the name of the file in question. Enter a regular expression to use during the matching. You can toggle between "Including" documents that match the filter, or "Excluding" them. Finally, you can specify any of the standard PERL regular expression flags to use when matching (e.g. "i" for case-insensitive matching). Finally, click "Add Filter" to add the filter to the "Defined Subcollection Filters" list.

To remove a filter, select it from the list and click "Remove Filter".

To alter a filter, select it from the list, change any of the values that appear in the editing controls and click "Replace Filter" to commit the changes.

Defining filters does not create partitions/sub-collections. Sub-collections are specified in the "Assign Partitions" tab, based on the filters you have just defined.

Assign Partitions

Having defined one or more sub-collection filters, use the "Assign Partitions" tab to build indexes for it (or for a group of filters). Select the desired filter or filters from the "Defined Subcollection Filters" list and click "Add Partition". Each specified partition will result in a sub-collection that contains documents that match any of the filters associated with that partition.

To alter a partition, select it from the list, modify the filters, and click "Replace Partition".

To remove a partition, select it from the list and click "Remove Partition".

The order that the partitions are specified in the Assigned Partitions list is the order they appear in the drop down menu on the search page. Use the Move Up and Move Down buttons to change this ordering.

To make a partition the default one, select it from the list and click Set Default.

As with search indexes, the names used for the drop-down list of partitions can also be set (after the collection is built) in the "Search" section under the Format panel.

Assign Languages

This section details how to restrict search indexes to particular languages. You do this by generating a partition using the "Assign Languages" tab of the "Partition Indexes" panel.

Language partitions use metadata to determine which documents are in the specified languages and therefore should be included in the partition. Greenstone generates "ex.Language" metadata for most documents, and this is the default metadata to use. However, this can be changed by setting Language Metadata to the correct metadata element.

To add a new language partition, select one or more languages from the "Languages to add" list, and click "Add Partition".

To change an existing partition, select it from the "Assigned Language Partitions" list, modify the selected languages in the "Languages to add" list below, and click "Replace Partition".

To remove a language partition, select it from the "Assigned Language Partitions" list and click "Remove Partition".

The order that the language partitions are specified in the Assigned Language Partitions list is the order they appear in the drop down menu on the search page. Use the Move Up and Move Down buttons to change this ordering.

To set the default language partition, select it from the list and click "Set Default".

As with search indexes, the names used for the drop-down list of partitions can also be set (after the collection is built) in the "Search" section under the Format panel.

en/user/partition_indexes.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1