#community-help

Implementing Fuzzy Searching in Advanced Search Features

TLDR David needed help allowing typo tolerance in an advanced search. Kishore Nallan suggested using a multi_search endpoint and aggregating the results client side.

Powered by Struct AI
7
3mo
Solved
Join the chat
Sep 03, 2023 (3 months ago)
David
Photo of md5-5c5edeceeb0deef59cc5dcc791ce7045
David
07:48 PM
do the filter_by terms get the same typo-tolerance and infix/prefix logic applied as the query term?
07:51
David
07:51 PM
my goal was to basically allow typo tolerance in the "advanced search" section, where they can enter terms for each field they are querying against. I figure using something like q=*, filter_by=... was the best way to do that, but I'm not sure it achieves what I'm looking for
07:53
David
07:53 PM
alternatively I could use multisearch and find the intersection of the results, however I don't know if I like that approach
Sep 04, 2023 (3 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:33 AM
Filter by doesn't allow fuzzy searching. Only the q search term is fuzzy searched.
David
Photo of md5-5c5edeceeb0deef59cc5dcc791ce7045
David
01:34 AM
is there a recommended approach to searching multiple fields with separate query terms?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:36 AM
You have to use multi_search endpoint and aggregate the results client side.
David
Photo of md5-5c5edeceeb0deef59cc5dcc791ce7045
David
01:36 AM
that's what I thought. Thanks!