Resolving Issues with Synonyms and Typo Tolerance in a Document
TLDR Slavik was having trouble with synonyms and typo tolerance while searching for documents. Jason suggested using one-way vs multi-way synonyms and configuring typo-tolerance parameters.

May 15, 2023 (4 months ago)
Slavik
04:10 PMMay I ask you for your help, please?
I have a document whose name field value is
Volkswagen e-Golf 35 kWh (2017 - 2020)
.I added the synonyms to
Volkswagen
(screenshot 1) as vw, VW, vewe
. But when I am trying to search by vw
or VW
- there are no documents :(cURL:
curl '' \
-H 'authority: ' \
...
--data-raw '{"searches":[{"q":"vw","query_by":"name","sort_by":"name:asc","highlight_full_fields":"name","collection":"X","page":1,"per_page":8}]}' \
--compressed
I am using the alias for my index and searching inside it.
The
name
field structure is: { name: 'name', type: 'string', facet: false, sort: true }
Jason
04:16 PMVolkswagen
as the root, only searching for Volkswagen
will return results with that word, and also the words you’ve mentioned under Synonyms
Jason
04:16 PMSlavik
04:17 PMAdding
vw
as a root and Volkswagen
as a synonym resolved an issue.
Jason
04:19 PMvw
and VW
, just lower case is sufficientSlavik
04:22 PMalso, another question.
I have a document whose name field value is
BMW 225xe (2019 - 2022)
.When I am trying to search by
bmw
-> it works fine.When I am trying to search by
bwm
-> nothing. The same for bm
.Slavik
04:23 PM --data-raw '{"searches":[{"q":"Bwm","query_by":"name","sort_by":"name:asc","highlight_full_fields":"name","collection":"x","page":1,"per_page":8}]}' \
--compressed
Slavik
04:24 PMTypo-Tolerance parameters
or only by synonyms?Jason
04:28 PMmin_len_1typo
and min_len_2typo
https://typesense.org/docs/0.24.1/api/search.html#typo-tolerance-parameters
Slavik
04:29 PM
Typesense
Indexed 2764 threads (79% resolved)
Similar Threads
Phrase Search Relevancy and Weights Fix
Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.


Utilizing Vector Search and Word Embeddings for Comprehensive Search in Typesense
Bill sought clarification on using vector search with multiple word embeddings in Typesense and using them instead of OpenAI's embedding. Kishore Nallan and Jason informed him that their development version 0.25 supports open source embedding models. They also resolved Bill's concerns regarding search performance, language support, and limitations in the search parameters.



Typesense Search Solution Issues
Rolando faced incorrect search results using Typesense. Kishore Nallan suggested changing typo parameters and upgrading Typesense version. However, undesired results persisted and need further investigation.

Querying and Indexing Multiple Elements Issues
Krish queried fields with multiple elements, which Kishore Nallan suggested checking `drop_tokens_threshold`. Krish wished to force OR mode for token, but Kishore Nallan admitted the feature was missing. Krish was able to resolve the issue with url encoding.
Fine-Tuning Typesense Queries for Better Results with Plural Words
Sergio seeks advice on improving Typesense queries for plural words. Kishore Nallan suggests increasing the typo tokens threshold and adjusting the min_len_1typo and min_len_2typo params. Sergio confirms better results after making these changes.
