#community-help

Troubleshooting Facet Values Search Results Discrepancy

TLDR gab faced discrepancies with search results for different facet values. Kishore Nallan suggested upgrades and tweaks, partially resolving the issue. However, some inconsistencies remained.

Powered by Struct AI
Feb 11, 2022 (23 months ago)
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
01:26 PM
Hi,
I have 2 facets values for a facet a field called canton that are "Lucerne" | "Zurich"
Whenever I send q="lu" it find a document and also returns for highlights a matched tokens for "Lucerne"
Whenever i send q="zu" it find a document but it doesn't return for highlights a matched tokens for "Zurich"
I didn't get yet why in the seond case it doesn't find the facet like in the first case
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:36 PM
Are you able to reproduce this on a stand-alone example of 2 records?
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
01:46 PM
I cannot easily have such an exemple,
Would you see first some basic parameters that would influence this result :thinking_face:?
I have num_typo:1 highlight_full_fields:true
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:47 PM
My first recommendation is to see if this behavior still exists on recent RC builds, for e.g. 0.23.0.rc27
01:47
Kishore Nallan
01:47 PM
Ideally, this should not be happening, but I remember fixing some related quirks in the 0.23 rc builds.
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
01:49 PM
Oh it looks like locally I'm on v.0.21
01:49
gab
01:49 PM
I will start by upgrading to latest
02:52
gab
02:52 PM
fixed in rc27 !
02:52
gab
02:52 PM
thanks for help 😄
02:52
gab
02:52 PM
May I ask please to update my cloud container to this version?
03:01
gab
03:01 PM
Also still related to the same example. There is something strange for me.
Because I have a num_typo:1
When i type q="lu" I would expect both document come up. The one that exactly match with "Lucerne" and also the one with "Zurich" that has 1 typo tolerance, isn't it ?
The same happen if I type q="zu" only the document for Zurich will come up but not the one for "Lucerne"
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:08 PM
In 0.22, there is a change in the default value for typo_tokens_threshold: 1 -> set this to 10 (previous value). That should produce the earlier behavior.
03:08
Kishore Nallan
03:08 PM
For the upgrade, please email [email protected] with the cluster ID and version to upgrade to.
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
03:56 PM
Thanks. I'm trying the typo_tokens_threshold
My config is:
typo_tokens_threshold: 10
min_len1_typo: 1

I have stilll not have both facets that comes up
Feb 12, 2022 (23 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:46 AM
:thinking_face: Let me check and get back to you.
07:13
Kishore Nallan
07:13 AM
gab This works as expected for me. I indexed two documents with both of those values and tried searching for lu and it returns both documents. Check the query parameters I have underlined in the screenshot.
Feb 14, 2022 (23 months ago)
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
12:19 PM
Kishore Nallan Hi,
It looks like in your sample you're querying directly a "canton" collection.

Maybe my first message description was not so clear.
My collection is not directly a "canton" collection of documents.
I have a warehouses collection with inside, a facet field "canton"
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:47 PM
Can you create a small reproduceable example me to try?

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Troubleshooting Typo Highlighting in Search Queries

Stefan queried "chews" and "Roche", despite having a typo distance of 4, was highlighted. Kishore Nallan requested to test on v0.20 RC. Random results like "Sachets" and "Lachesca" were also highlighted. On single record query, highlighting works. Kishore Nallan assured to address this issue in the pending release.

1

25
34mo

Handling Kinesis Stream Event Batching with Typesense

Dui had questions about how to handle Kinesis stream events with Typesense. Kishore Nallan suggested using upsert mode for creation/update and differentiating with logical deletion. After various discussions including identifying and resolving a bug, they finalized to introduce an `emplace` action in Typesense v0.23.

8

91
24mo

Troubleshooting "drop_tokens_threshold" and Typo Tolerance in Typesense

Joe had issues with "drop_tokens_threshold" = 0 and typo tolerance in Typesense, after which Kishore Nallan provided solutions and clarifications on feature functionality. Their issues with the search result limit and tokens were resolved after discussion and testing.

3

29
26mo

Issues with Highlight Version in Typesense

Stefan reported issues with the new highlight version in Typesense. Kishore Nallan provided a temporary workaround and further fixed the issue with an updated build.

21
13mo

Query on Facet Values, `max_facet_values` , and `facet_query_num_typos`.

Jan asked about sorting facet values, managing `max_facet_values` and issues with `facet_query_num_typos`. Jason clarified the details on instantsearch widget handling of `max_facet_values` and identified a bug on the Typesense Server. Jason suggested a solution to the sorting issue.

2

23
1mo