Suffix searching means matching a query against the end of a word. Infix searching means matching a query against part of a word in the middle. For example:
Suffix match: query
ballmatchingbasketballInfix match: query
partmatchingcompartment
Algolia’s search engine matches query terms from the beginning of words (prefix matching). It doesn’t natively match text in the middle or at the end of a word, so infix and suffix searching aren’t supported by the engine itself.
If you need to support suffix-style queries (for example, searching on the last characters of a product code), you can approximate this behavior by restructuring your data. A common approach is:
Choose the attribute you want to search by suffix (for example, a product reference or SKU).
Generate an additional attribute that contains all desired suffixes of that value (for example,
"ABCDEF","BCDEF","CDEF","DEF","EF","F").Add this suffix attribute to your searchable attributes so queries can match those suffix tokens.
This approach increases index size and can impact relevance, so it’s best reserved for focused use cases such as product references, SKUs, or other structured identifiers where suffix search is truly required.
Resources: