This message was deleted.
# community-help
s
This message was deleted.
k
Set the drop_tokens_threshold parameter to a value like 100. This is by default 1, that is, if there is atleast one result found with all tokens in the query we will not look for records which contain only partial words.
s
Wow, thank you the quick reply. Let me read over the documentation for this and try to implement it real quick.
@Kishore Nallan I just implemented this and am now seeing more results. However they appear to be somewhat out of order. The first result shows 3 matched_tokens, second result 2, third result 3. Is this to be expected or do I need to also do a sort based on matched_tokens?
k
Can you post the result response?
👍 1
s
Search phrase was
spiderman house duplo 10995
with
drop_tokens_threshold: 2
. The first is on line 64 and has all matched tokens, the next result with all the matched tokens doesnt occur until line 862.
k
That's odd. Let me look into what's happening and get back you. Can you also post the exact query made, e.g. which fields were queried etc.
I think this is a bug that has been fixed in a recent build.
Are you using Docker?
s
Query is
Copy code
searchParameters = {
    q: textQuery,
    query_by: 'title',
    per_page: 20,
    drop_tokens_threshold: 2,
    page // include page here
};
const searchResults = await typesense
    .collections('products100v2')
    .documents()
    .search(searchParameters);
return json(searchResults);
Yarn lock shows typesense at version 1.7.1. No docker- it's installed on my ubuntu server with 2tb of memory.
k
Can you please try on this version:
0.25.2.rc1
You can just edit the download URL to update the version string to
0.25.2.rc1
s
Yes. Give me an hour or so as I have 150gb typesense instance so it takes a little bit to stop and start it.
k
Oh got it. You can maybe try running another process?
s
What do you mean?
k
Basically run the new version on another port, index some docs and verify that it works.
👍 1
Copy code
./typesense-server --data-dir=/tmp/data --api-key=XXXXXXXX
This will start Typesense on port 8108.
s
Hi @Kishore Nallan I'm not seeing this issue anymore 🙂
k
Glad to hear, thanks for confirming
s
@Kishore Nallan Is it ok if I send you a direct message. I have a very unique use case that I think typesense would benefit from.
k
Yes!