Querying Multiple String Requirements on a Single Field
TLDR Todd had a query on string requirements on a single field using the 'q' parameter. Jason clarified and guided suggesting using filter_by=field:word1
for desired results.
2
1
1
1
Jun 10, 2022 (19 months ago)
Todd
09:03 PMq
parameter?Jason
09:04 PMTodd
09:05 PM1
Jason
09:05 PMquery_by
Todd
09:05 PMJason
09:06 PMquery_by
, then the only other way to do what you want to do is to use filter_by=field:word1
Todd
09:06 PMJason
09:07 PMq
will work together with this: https://typesense-community.slack.com/archives/C01P749MET0/p1654895083820999?thread_ts=1654895017.270089&cid=C01P749MET01
Todd
09:07 PM1
1
Todd
09:13 PMIf I want to do a filter_by clause on a string, can I do an includes type of operation? The answer is yes, you do
filter_by=field:word1
1
Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
Trouble with Document Matching in 'filter_by' Field
Roman struggled with incorrect matches in the `filter_by` field. Kishore Nallan explains it only works at the word level, not partial prefix, and suggested setting `drop_tokens_threshold` to 0 to prevent incorrect matches.
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.
Query Logic in 'q' Parameter
A had a question about using AND and OR in the 'q' parameters. Jason clarified that 'filter_by' should be used for structured search instead.
Using Partial String Match with Filter_By
Phillip wanted to use partial string match with `filter_by`. Jason suggested using `query_by` and explained filter_by's word-level matching works.
Querying Documents with "OR"
Aapo queried about making "OR" searches across documents for specific terms. Kishore Nallan clarified that OR search is limited to the same field and doesn't support free text search in the "q" parameter.