Handling Infix Search in Typesense
TLDR Lalit asked about handling infix search in Typesense. Dima suggested adding '-' to token separators. Lalit anticipated more special cases. Kishore Nallan argued infix search might be CPU intensive and might be better for handling initial typos.
Aug 15, 2023 (1 month ago)
Lalit
01:34 PMi have item named T-shirt
i searched with keyword shirt
it gives me no result
infix: 'always',
infinix does the work just wanted toa sk that if this is the right approach
Dima
01:35 PM-
to token_separators
https://typesense.org/docs/0.24.1/api/collections.html#schema-parameters
> For e.g. you can add
-
(hyphen) to this list to make a word like non-stick
to be split on hyphen and indexed as two separate words.Lalit
01:36 PMKishore Nallan
02:28 PMTypesense
Indexed 2779 threads (79% resolved)
Similar Threads
Handling Singular vs Plural in Search Queries
Rajeev queried about handling singular and plural in search queries. Kishore Nallan explained that there's no definite way for handling plurals in Typesense. They agreed to troubleshoot Rajeev's query issues further.
Discussing Prefix-Match for Multiple Tokens
Sidharth asked if prefix matching for separate tokens was possible and Kishore Nallan explained why it would be computationally intensive. Kishore Nallan then suggested an ngram solution which seemed to satisfy Sidharth's need.
Token Priorities and Infix Search in Typesense Multi-word Queries
Sidharth sought guidance on creating multi-word query with token priority in Typesense. Kishore Nallan explained fetching results only for last word as prefix and suggested `infix` search and data modelling as potential solutions. However, Kishore Nallan emphasized that `infix` doesn't support multiple words and is only recommend for small datasets.