Hi :wave::skin-tone-5: all. The `num_typos` param...
# community-help
h
Hi 👋🏾 all. The
num_typos
param is equal to the Levenshtein distance? is not clear to me reading the docs. I've set
num_typos: 2
, the max, but I'm getting results like the image for the query
anillos compromiso
.
typo_prefix_score
is 4 which is the Levenshtein distance;
tokens_matched
is 2, but it seems like just 1 token match.
these are the search params used
this is in the context of debugging some highly un-relevant results I'm getting for some queries
maybe is what's happening in this case
k
Typo prefix score will combine typo matches across words in the query. Maybe there's another token matched but somehow not getting highlighted. Can you check the raw json response? There'll be a tokens_matched array for each hit.
h
this is the response
in this case is incorrectly duplicating the match I think
to be clear here, for me is an unwanted result that
anillos
match
villa
the Levenshtein distance between those is 4, to high for what I want
k
I'm actually unable to reproduce the issue. I'm using the search_query preset. This is what I get.
You can also directly try this query (replace
localhost
with your host name)
Copy code
curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -k '<https://localhost/multi_search>' --data-raw '{"searches":[{"preset":"search_query","collection":"ads_2405011912","q":"anillos compromiso","page":1,"per_page":6}]}'
The above also produces correct results.
h
hi @Kishore Nallan the potential bug can be spotted in the page 10 of that search
just change
"page": 10
in your curl command and you will see it
k
Ok will check again