marqo
marqo copied to clipboard
[ENHANCEMENT] Limit number of searchable tensor field
Feature
Limit the number of tensor fields that can be included in the searchable attributes, configurable by environment variables.
Changes
- Environment variable
MARQO_MAX_SEARCHABLE_TENSOR_ATTRIBUTES
sets the maximum number of searchable attributes.-
len(searchable_attributes) <= MARQO_MAX_SEARCHABLE_TENSOR_ATTRIBUTES
-
- Restrict size of
searchable_attributes
for API endpoint/indexes/{index_name}/search
whensearchMethod==TENSOR
- Restrict size of
searchableAttributes
in each entry of body of/indexes/bulk/search
for body entries withsearchMethod==TENSOR
Open Questions
- When
searchable_attributes
is unspecified, how do we select k from n attributes to search, whenn > MARQO_MAX_SEARCHABLE_TENSOR_ATTRIBUTES