#community-help

Complex Boolean Searches in InstantSearch Adapter

TLDR Ailish asked for complex boolean search examples. Kishore Nallan shared a link but clarified that boolean operators aren't supported for the q parameter, only for filtering.

Powered by Struct AI

1

Apr 17, 2023 (8 months ago)
Ailish
Photo of md5-7fcbf02da67845f42ef837fd8a989396
Ailish
03:01 PM
Ello ๐Ÿ‘‹ Any implementation examples of complex boolean searches out there?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:29 PM
If you can express what you want to do in English, I can post an example.
Ailish
Photo of md5-7fcbf02da67845f42ef837fd8a989396
Ailish
03:35 PM
Would you mind giving some arbitrary examples? I just want to see the syntax
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:37 PM
Ailish
Photo of md5-7fcbf02da67845f42ef837fd8a989396
Ailish
03:46 PM
Thanks - I guess my use case is kind of tricky as Iโ€™m using the instantsearch adaptor ๐Ÿ˜• would it require somehow grabbing the search and altering it before sending it off to typesense? or am I overcomplicating it?
03:46
Ailish
03:46 PM
so for example Iโ€™d like to allow the user to do things like:
NOT(a AND b) OR c in a simple string that Iโ€™ll pass to typesense
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:51 PM
Ah that is not possible. The query string can only be a plain string. You can wrap string in quotes for phrase search but we don't support boolean operators for the q param.
03:51
Kishore Nallan
03:51 PM
Only filtering supports boolean expression.
Apr 18, 2023 (8 months ago)
Ailish
Photo of md5-7fcbf02da67845f42ef837fd8a989396
Ailish
07:45 AM
Thanks Kishore Nallan Iโ€™m gonna DM you if thatโ€™s cool

1

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Phrase Search Relevancy and Weights Fix

Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.

6

111
8mo

Resolving Embedding Distance Threshold Error Query Using '*'

Walter was having trouble using the embedding distance threshold which gave out an error with a '*'. Kishore Nallan clarified the issue and suggested a solution. Jason also provided a link to help dynamically set typesense-instantsearch-adapter parameters for future inquiries. The issue was resolved by their inputs.

2

13
2mo

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.

6

44
5mo

Implementation and Testing of Negative Filtering on Typesense

Stefan needed an ETA on implementing negative filtering on layer of `typesense`. Kishore Nallan provided updates, fixes, and an early build for testing. Further plans on adding it to instantsearch adapter were discussed, with Stefan also offering to contribute.

3

23
33mo

Typesense Sorting Query and Bug Report

michtio is new to Typesense and is querying sorting implementation. Jason shares resources and suggests use of specific adapters. However, michtio shares a bug found when applying a filter on Typesense. Jason asks for a GitHub issue to be opened for the bug.

14
18mo