#community-help

Resolving Search Parameter Issues in Endpoint

TLDR Julian had issues with endpoint search parameters not returning expected results. Jason and Kishore Nallan suggested using exhaustive_search=true and max_candidates=1000 respectively, which resolved the issue.

Powered by Struct AI

1

Jan 26, 2023 (11 months ago)
Julian
Photo of md5-0fd5eb18d71e23452bf6b5d61282ac8e
Julian
11:00 PM
Hi guys!
What do you recommend me to check in this case? When the search term is zp9Sis, I’m expecting to match with strings like zp9Sis-230123-001, zp9Sis-230123-011 and zp9Sis-230123-021 (the last three are a serial number). But, currently only some of them appear (10), except when the search is more precise, like zp9Sis-230123-00. I’m hitting this endpoint with these URL params:

query_by=confirmation_id,purchase_order_identifiers&num_typos=0&sort_by=&highlight_full_fields=confirmation_id,purchase_order_identifiers&q=zp9Sis-230123-&facet_by=arrival_time,facility_name,checkin_status,scheduler_name,equipment_type_id,status,appointment_type_name,created_by_name&filter_by=&max_facet_values=10&page=1&per_page=25

I even added the - to the symbols_to_index search param. Thanks in advance.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:02 PM
Could you add exhaustive_search=true as a search parameter and try again?
Jan 27, 2023 (11 months ago)
Julian
Photo of md5-0fd5eb18d71e23452bf6b5d61282ac8e
Julian
03:24 AM
Hi Jason! Thanks a lot, it worked right away using that search parameter

1

Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:15 AM
The other parameter which might be more targeted for this will be the max_candidates param. This directly controls the number of unique words to be used as candidates for search when there are multiple words that share the same prefix. Set this to a higher value like 1000 . The exhaustive_search can be more expensive because it increases a bunch of other limits including max_candidates and you probably don't need that here.