indexingFragments
parameterThe new indexingFragments
embedder setting is available for embedders with source rest
.
It is an object whose keys can be freely chosen by the user, and values are “indexing request fragment” objects.
When processing a document, Meilisearch assembles the request fragments for that document, and when enough request fragments have been assembled, send a request to the remote embedder.
When indexingFragments
is present and non-null
, then the following changes occur:
documentTemplate
must be absent or null
, otherwise an error is raised.request
should not use the "{{text}}"
placeholder, but rather the "{{fragment}}"
placeholder, standing for the various fragments being assembled.searchFragment
parameterThe new searchFragments
embedder setting is available for embedders with source rest
.
It is an object whose keys can be freely chosen by the user, and values are “search request fragment” objects.
When processing a search, Meilisearch finds a matching request fragment for that search query, and send a request to the remote embedder.
A request fragment is a JSON object with the following fields:
value
: an arbitrary JSON value that must match the part (fragment) of a request to the remote REST embedder describing one input to embed.
indexingFragments
or in searchFragments
:
indexingFragments
:
{{doc.attribute}}
is replaced by the content of the field attribute
in the document at indexing time. The fragment cannot be generated at search time.searchFragments
:
{{q}}
is replaced by the content of the q
field at search time. The fragment cannot be generated at indexing time.{{media.attribute}}
is replaced by the content of the field attribute
in the media search query. The fragment cannot be generated at indexing time.media
search query parameterSearch queries can now contain an additional media
parameter.
null
or a JSON object with arbitrary keys.