#community-help

Search Issue with Certain Keywords in Code

TLDR suraj struggles with certain keywords during code search, with the system only recognizing part of the word. Kishore Nallan suggests enabling infix search param and reproducing the issue with curl, but the problem persists. Solution remains unsolved.

Powered by Struct AI
Aug 08, 2023 (2 months ago)
suraj
Photo of md5-396118c791d531ff7af8cd473d5b26ff
suraj
09:34 AM
Hi Kishore Nallan 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
09:34
suraj
09:34 AM
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:36 AM
Can you elaborate what you mean by "not working"?
suraj
Photo of md5-396118c791d531ff7af8cd473d5b26ff
suraj
09:37 AM
I have given query as RTO but it only searched for keyword RT, Have used maxcandidate as well but failed to get record which has rto as keyword
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:39 AM
Ok will check. Did you try with curl as Jason suggested earlier?
09:57
Kishore Nallan
09:57 AM
suraj can you paste the exact record in the stock brand file that you expect to find for the query rto?
09:58
Kishore Nallan
09:58 AM
I don't find any records starting with rto suraj
suraj
Photo of md5-396118c791d531ff7af8cd473d5b26ff
suraj
10:08 AM
it is not starting with rto
10:08
suraj
10:08 AM
{"market_id":"11613719","cmot_id":"209","exchange_id":"1","security_cd":"","symbol":"GRINDWELL","security_nm":"Grindwell Norton Ltd","short_security_nm":"Grindwell Norton","isin":"INE536A01023","series":"","brand":[{"heading":"Abrasives Business","brandName":"Norton"}
10:08
suraj
10:08 AM
example : Norton which consist of keyword rto
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:10 AM
By default Typesense only does prefix search. For infix search you have to enable infix index on the field (which you have done above in the code) but you should also include the infix search param while searching.
suraj
Photo of md5-396118c791d531ff7af8cd473d5b26ff
suraj
01:01 PM
I have added infix param as well, but it is giving me same result
.infix("fallback,fallback,fallback") // Have added in code
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:07 PM
Sorry, please reproduce your issue with curl. We support a large number of customers so unable to run code in different languages for initial debugging.
01:08
Kishore Nallan
01:08 PM
Without that, the only thing I can suggest is trying with always instead of fallback.