marqo icon indicating copy to clipboard operation
marqo copied to clipboard

[ENHANCEMENT] Limit number of searchable tensor field

Open Jeadie opened this issue 1 year ago • 0 comments

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 when searchMethod==TENSOR
  • Restrict size of searchableAttributes in each entry of body of /indexes/bulk/search for body entries with searchMethod==TENSOR

Open Questions

  • When searchable_attributes is unspecified, how do we select k from n attributes to search, when n > MARQO_MAX_SEARCHABLE_TENSOR_ATTRIBUTES

Jeadie avatar Apr 11 '23 23:04 Jeadie