#community-help

Issue with Specific Keywords in Search Code

TLDR suraj is having difficulties with specific keywords in their search code. Jason suggested adjusting the search parameters and requested further details for troubleshooting.

Powered by Struct AI
Jul 26, 2023 (2 months ago)
suraj
Photo of md5-396118c791d531ff7af8cd473d5b26ff
suraj
10:02 AM
Hi Guys, few keyword is not working for me when I use them for searching, attaching code for your reference
when I search 'RTO' it only searches, RT
10:03
suraj
10:03 AM
Attaching code and json file for your reference
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:26 PM
Could you try setting max_candidates=100000 as an additional search parameter?
Jul 27, 2023 (2 months ago)
suraj
Photo of md5-396118c791d531ff7af8cd473d5b26ff
suraj
04:10 AM
Jason Have added the same as mentioned by you, however getting the same result.
Below is the code added
SearchParameters searchParameters = new SearchParameters().q(query.toLowerCase())

.queryBy("security_nm,symbol,brand.brandName")
.maxCandidates(100000)
.prefix("true,true,true")
// .infix("fallback,fallback,fallback")
.queryByWeights("3,2,1")
//.prioritizeExactMatch(false)
.perPage(50);
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:39 AM
Could you give me a curl command like this that replicates the issue:
Aug 02, 2023 (2 months ago)
suraj
Photo of md5-396118c791d531ff7af8cd473d5b26ff
suraj
04:11 AM
Jason Kishore Nallan Little difficult for me to do it using curl, as I m using java to fetch data from typesense server, however please check below param which is getting passed from java
04:14
suraj
04:14 AM