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
useMultipleSearchIndicestotruebe sure to runPOST APIinit/indicesorPOST /APIinitto synchronize existing default indices of VidiCore for this feature. When initializing or recreating the default indices of VidiCore and theuseMultipleSearchIndicesis already set totrue, the callPOST /APIinit/indicesorPOST /APIinitis 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 filtercolumn from the table. - Filter which do not require customization e.g.
uniqueorlowercasecan 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
languageelement in the IndexDocument has to equal a language which does equal onelangattribute, used in theMetadataValueTypeof metadata. - The
settingselement 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
languageelement. Thelanguageelement has to equal onelangattribute, used in theMetadataValueTypeof metadata.Accepts: - application/xml, application/json – IndexDocument
Produces: - application/xml, application/json – IndexInformationDocument
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>{"index.number_of_shards":2,"index.blocks.write":true,"index.mapping.total_fields.limit":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
opensearchLanguageelement. 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>{"index.number_of_shards":2,"index.blocks.write":true,"index.mapping.total_fields.limit":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
langpath parameter has to equal onelangattribute, used in theMetadataValueTypeof 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
langparameter. Thelangpath parameter has to equal onelangattribute, used in theMetadataValueTypeof metadata.Produces: - application/xml, application/json – IndexInformationDocument
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: - application/xml, application/json – IndexInformationListDocument
Status Codes: - 500 Internal Server Error – If multiple indices are not enabled.
Role: _index_read