Search2 index creation (beta)

New in version 25.4: VidiCore offers a new search feature which allows a search specialized for language analysation. To use this new feature a creation of specialized language indices is necessary.

Important

  • This feature for multilingual searching is in the beta phase. Following methods are subjects of change while in the beta status.
  • The search on those indices is performed with search version 2. For more information about this search version see Search version 2 (beta).
  • To migrate an existing system to this search, please look into Multilingual search migration
  • When setting useMultipleSearchIndices to true be sure to run POST APIinit/indices or POST /APIinit to synchronize existing default indices of VidiCore for this feature. When initializing or recreating the default indices of VidiCore and the useMultipleSearchIndices is already set to true, the call POST /APIinit/indices or POST /APIinit is necessary as well.

Create index

Note

  • To create personalized filter please look into: OpenSearch filter
    • Send the name, the filter type and all needed parameter containing the name and values.
    • For the filter type please use the string of the Token filter column from the table.
    • Filter which do not require customization e.g. unique or lowercase can be named in the analyzer without pre configuring.
  • To create personalized analyzer please look into: OpenSearch tokenizer. Personalized analyzer require the filter name of all created filter, see example.
  • The language element in the IndexDocument has to equal a language which does equal one lang attribute, used in the MetadataValueType of metadata.
  • The settings element in the IndexDocument has to be transmitted as a json string, see example.
  • The index name has to be corrected for the naming conventions of OpenSearch if necessary, see OpenSearch create index
POST /index

Please note to add the language of the metadata as the language element. The language element has to equal one lang attribute, used in the MetadataValueType of metadata.

Accepts:
Produces:
Status Codes:
  • 500 Internal Server Error – If multiple indices are not enabled.
Role:

_index_write

Following shows an example to create an index for the language it with personalized filter and analyzer:

<IndexDocument xmlns="http://xml.vidispine.com/schema/vidispine">
    <indexName>example-index</indexName>
    <language>it</language>
    <filter>
        <name>example_stemmer</name>
        <filterType>stemmer</filterType>
        <parameter>
            <name>language</name>
            <value>italian</value>
        </parameter>
    </filter>
    <filter>
        <name>example_stopper</name>
        <filterType>stop</filterType>
        <parameter>
            <name>stopwords</name>
            <value>_italian_</value>
        </parameter>
    </filter>
    <textAnalyzer>
        <tokenizer>whitespace</tokenizer>
        <filter>example_stemmer</filter>
        <filter>example_stopper</filter>
        <filter>unique</filter>
        <filter>lowercase</filter>
    </textAnalyzer>
    <searchAnalyzer>
        <tokenizer>whitespace</tokenizer>
        <filter>example_stemmer</filter>
        <filter>example_stopper</filter>
        <filter>unique</filter>
        <filter>lowercase</filter>
    </searchAnalyzer>
    <indexSettings>{&quot;index.number_of_shards&quot;:2,&quot;index.blocks.write&quot;:true,&quot;index.mapping.total_fields.limit&quot;:3000}</indexSettings>
</IndexDocument>

Tip

  • OpenSearch offers the opportunity to use pre configured language analyzer. To use them it is sufficient to send the OpenSearch language to use the analyzer from OpenSearch in the opensearchLanguage element. All language analyzer of OpenSearch can be found here: OpenSearch language analyzer.
<IndexDocument xmlns="http://xml.vidispine.com/schema/vidispine">
    <indexName>OSLanguage_AnalyzerIndex</indexName>
    <language>en</language>
    <textAnalyzer>
        <opensearchLanguage>english</opensearchLanguage>
    </textAnalyzer>
    <searchAnalyzer>
        <opensearchLanguage>english</opensearchLanguage>
    </searchAnalyzer>
    <indexSettings>{&quot;index.number_of_shards&quot;:2,&quot;index.blocks.write&quot;:true,&quot;index.mapping.total_fields.limit&quot;:3000}</indexSettings>
</IndexDocument>

The following shows an example of an IndexInformationDocument as a result of a index creation for the language it and personalized filter and analyzer.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IndexInformationDocument xmlns="http://xml.vidispine.com/schema/vidispine">
    <name>example-index1762698015701</name>
    <language>it</language>
    <alias>example-index</alias>
    <settings>
        {"replication":{"type":"DOCUMENT"},"mapping":{"total_fields":{"limit":"3000"}},"number_of_shards":"2","blocks":{"write":"true"},"provided_name":"example-index1762698015701","creation_date":"1762698019884","number_of_replicas":"1","uuid":"Br2E7P65TAORKR3761oz_w","version":{"created":"136408127"}}
    </settings>
    <analyzer>
        <tokenizer>whitespace</tokenizer>
        <filter>["example_stemmer","example_stopper","unique","lowercase"]</filter>
    </analyzer>
    <analyzer>
        <tokenizer>whitespace</tokenizer>
        <filter>["example_stemmer","example_stopper","unique","lowercase"]</filter>
    </analyzer>
    <analyzer>
        <tokenizer>keyword</tokenizer>
        <filter>["icu_identical"]</filter>
    </analyzer>
    <filter>
        <name>example_stemmer</name>
        <filterType>stemmer</filterType>
        <parameter>
            <name>language</name>
            <value>italian</value>
        </parameter>
    </filter>
    <filter>
        <name>example_stopper</name>
        <filterType>stop</filterType>
        <parameter>
            <name>stopwords</name>
            <value>["_italian_"]</value>
        </parameter>
    </filter>
</IndexInformationDocument>

Update index

PUT /index/(lang)

Updates the settings of an existing index. The lang path parameter has to equal one lang attribute, used in the MetadataValueType of metadata.

Accepts:
  • text/plain – A json string which specifies the index settings should be updated. All settings have to be transmitted as a json string, see example for creating an index.
Status Codes:
  • 200 Ok – If the index was updated successfully.
  • 500 Internal Server Error – If multiple indices are not enabled.
  • 304 Not modified – If the index was not updated.
Role:

_index_write

Get index

GET /index/(lang)

Get information about one index with the lang parameter. The lang path parameter has to equal one lang attribute, used in the MetadataValueType of metadata.

Produces:
Status Codes:
  • 500 Internal Server Error – If multiple indices are not enabled.
Role:

_index_read

Get all indices

GET /index

Get information about all indices.

Produces:
Status Codes:
  • 500 Internal Server Error – If multiple indices are not enabled.
Role:

_index_read

Delete index

DELETE /index/(lang)

Deletes an index. The lang path parameter has to equal one lang attribute, used in the MetadataValueType of metadata.

Status Codes:
  • 200 OK – If the index was deleted.
  • 500 Internal Server Error – If the index could not be deleted.
Role:

_index_write