#community-help

Using Partial String Match with Filter_By

TLDR Phillip wanted to use partial string match with filter_by. Jason suggested using query_by and explained filter_by's word-level matching works.

Powered by Struct AI
Jun 14, 2022 (19 months ago)
Phillip
Photo of md5-3d8346de287401da0aaa8b11cddb1db7
Phillip
07:02 PM
Is it possible to do a partial string match with filter_by? For example, if I have a field content with a value of hello there, can I filter with content: hell to return that document?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:33 PM
Not with filter_by... Any reason query_by won't work? That does prefix matching like you describe
Phillip
Photo of md5-3d8346de287401da0aaa8b11cddb1db7
Phillip
07:34 PM
Trying to avoid having to do multiple searches. Will have to end up doing multiple I believe. Thanks!
07:34
Phillip
07:34 PM
Todd Viji
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:36 PM
On a side note, filter_by has a word-level matching mode. So if you do filter_by= content:there (instead of content:=there) it will do word-level match and return hello there. But the full word needs to be there in filter_by, it doesn't match on prefixes
Phillip
Photo of md5-3d8346de287401da0aaa8b11cddb1db7
Phillip
07:36 PM
Yupp figured that out! Thanks