Issue with filter_by on String Type Fields
TLDR Sidharth is facing problems when trying to perform filter_by on 2 separate fields of string type. Kishore Nallan suggests it may be a URL encoding issue.
1
Jan 05, 2023 (11 months ago)
Sidharth
10:03 AMWe are trying to perform filter_by on 2 separate field of string type
facet is set true in the schema
Its working when checking for single value
filter_by=exchange:A&&segment:X
But when we are trying to send a list as parameter, its not working in Curl
Tried following options
&filter_by=exchange:[A,B]&&segment:[X,Y]
&filter_by=exchange:A,B&&segment:X,Y
Kishore Nallan
10:05 AM1
Sidharth
10:20 AMThanks
Typesense
Indexed 3011 threads (79% resolved)
Similar Threads
Usage and Modification of Dynamic Routes in Typesense Documents
Ethan needed a way to perform exact queries through two fields in Typesense documents. Kishore Nallan demonstrated its possibility using the "filter_by". An issue was resolved via recommending that fields in 'query by' should be a string type.
Multiple Filters and JSON Requests in Typesense
Manish asked about multiple filter_by arguments, JSON input, and using multisearch. Jason offered typesense documentation links, examples, and how to use JSON formatted requests with multisearch. Ed shared a similar use case.
Querying Typesense API with Array of Strings
Nikhilesh was struggling to query the typesense API with an array of strings. Kishore Nallan clarified the issue might be related to url encoding and further explained how to properly use the `q` and `filter_by` parameters.