Good morning. We are experiencing a strange issue....
# community-help
e
Good morning. We are experiencing a strange issue. When searching for something on 'book_id' we have 60 records that have a book_id that starts with 'EXAMPLE'. When I perform a search (both on the cloud ui and our build) of 'EXAM', only 4 show up. Most records are 'EXAMPLE[set of numbers]' e.g. 'EXAMPLE001'. If I search for the full exact match term, the record will be found but otherwise I don't get a full list? We're on v0.23.0.rc62
k
Can you send
?max_candidates=1000
as an additional search parameter?
e
It has improved it to 10 results
k
What about searching with
exhaustive_search=true
e
ah. that has made a big improvement
where do I find these options to add. And is this something we should always use?
It has made the search noticeably slower. Is that normal?
k
Yes, so what's happening is this: When there are a lot of words sharing a prefix, Typesense restricts prefix candidates to a few words because typically it's difficult to guess which word the user is actually looking for so Typesense only looks at top 4. The max_candidates is supposed to increase that to a higher number as you see fit. However, I don't know why it doesn't work for you. This parameter is added only in 0.23 RC.
exhaustive_search
is more thorough as it also deals with dropping of tokens from the query etc. so it will be slower.
If there's a way for you to share your dataset (any representative set that reproduces the problem), I can investigate why increasing max_candidates is not working.
e
That's strange that the max_candidates isn't working for it. We definitely have at least 30 records that start with 'EXAMPLE'
k
Please DM me a sample dataset and query and I should be able to get to the bottom of it.
I've identified the issue with
max_candidates
not being enough here. I will now look into it. Thanks for bringing this to my attention!