Create suffix attributes
In the following product dataset, theproduct_reference
attribute has a numeric prefix, used for internal purposes.
JSON
product_reference
, as an array.
product_reference_suffixes
:
JSON
Limitations
Generating a list of suffixes for each record can increase index size and slow performance, It may also reduce relevance for short suffixes such as “EF” or “F”, because these can match unrelated records with similar character sequences. Use this approach only if you genuinely need to query in the middle or the end of words. To reduce the impact of suffix generation, consider the following strategies:- Generate suffixes only for strings longer than a defined length, such as 4 or more characters.
- Limit suffix generation to a specific number per record, such as 5.
- Apply suffix generation only to structured fields, such as product codes or identifiers.
Update your searchable attributes
Addproduct_reference_suffixes
to your searchable attributes to make the suffixes searchable.
product_reference_suffixes
below product_reference
to exact matches rank higher than partial matches.