mappings) for an add_documents call. Mappings can be used for granular control over a field.
Currently, it is supported for the multimodal_combination, custom_vector, and text_field field types.
When creating a structured index you define weights for a multimodal field under dependent fields. When adding
documents mappings is optional with structured indexes and is only needed if the user needs to override default
multimodal weights defined at index creation time.
Mappings is used to define custom_vector fields for unstructured indexes only. For structured indexes, do not include custom_vector fields in mappings. Instead, declare them as fields during index creation.
Language and stemming mappings are only supported for unstructured indexes created with Marqo 2.16 or later.
Mappings object
Multimodal Combination Mappings
Defining the mapping formultimodal_combination fields:
Custom Vector Mappings
Defining the mapping forcustom_vector fields (in an unstructured index):
Unstructured Index
=== “Marqo Open Source”your_endpoint with this. To do this, visit Find Your Endpoint. You will also need your API Key. To obtain this key visit Find Your API Key.
Structured Index
=== “Marqo Open Source”your_endpoint with this. To do this, visit Find Your Endpoint. You will also need your API Key. To obtain this key visit Find Your API Key.
Text Field Language and Stemming Mappings
For unstructured indexes created with Marqo 2.16 or later, you can specify language and stemming method for text fields to control lexical search behavior:- Tokenization
- Stemming
- Stop word removal
- Other language-specific text processing
best. The following stemming methods are valid:
none: Index words without stemmingbest: Choose the best stemshortest: Choose the shortest stemmultiple: Retain all possible stems
Notes
- A field’s language and stemming method are set the first time it is indexed. Attempting to index the same field with a different language or stemming method will result in a 400 error.
- If no language is specified for a new field, that field will use automatic language detection.
- If language or stemming method is omitted in subsequent mappings, the previously set language or stemming method is used.
- When searching indexes with more than one stemming method, always specify lexical searchable attributes. This ensures the query is expanded and stemmed for each text field, providing the best recall.
Supported Languages
The following language codes are supported:- Arabic (
ar) - Catalan (
ca) - Danish (
da) - Dutch (
nl) - English (
en) - Finnish (
fi) - French (
fr) - German (
de) - Greek (
el) - Hungarian (
hu) - Indonesian (
id) - Irish (
ga) - Italian (
it) - Norwegian (
nb) - Portuguese (
pt) - Romanian (
ro) - Russian (
ru) - Spanish (
es) - Swedish (
sv) - Turkish (
tr)