#community-help

Query String with OR Functionality in Typesense

TLDR Michael asked how to build a query string with "OR" functionality, but Kishore Nallan informed them it is not currently supported. However, a new version of Typesense with better similarity operations is coming in a week or two.

Powered by Struct AI

3

9
4mo
Solved
Join the chat
May 22, 2023 (4 months ago)
Michael
Photo of md5-0cab3a3dbc3934c73e95b7a427d8934e
Michael
11:13 AM
Apologies for the basic question, but currently trying to build a query string that matches any of the words in a title - e.g. if the title is 'Big Red Volkswagen Golf' it should search for big OR red OR volkswagen OR golf. I've tried q=:[big,red,volkswagen,golf] and q=Big Red Volkswagen Golf, but get zero results. If I change the query to q=:big (or any of the other words on their own) I start seeing results. Not sure what I'm doing wrong. Any advice appreciated.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:14 AM
👋 we don't support OR or other operators in the query string. So it's not possible to do what you want. However, we do have an open feature request for this.
Michael
Photo of md5-0cab3a3dbc3934c73e95b7a427d8934e
Michael
11:19 AM
ok. good to know. i'm trying to build similar ads functionality without having to learn about LLM and vectors 😆. might just group by category for now.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:20 AM
In the next version of Typesense you can embed one or more fields without knowing anything about vectors 🙂 We will take care of the vectorization fully.
11:21
Kishore Nallan
11:21 AM
IMO, it's much simpler to do similarity operations using vectors.
Michael
Photo of md5-0cab3a3dbc3934c73e95b7a427d8934e
Michael
11:23 AM
nice. is there a timeline in place for that release?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:24 AM
I'll be happy to share a rc build with you in a day or so. We've already been testing it.
11:24
Kishore Nallan
11:24 AM
About a week or two away from releasing the next version. Almost on code freeze now.
Michael
Photo of md5-0cab3a3dbc3934c73e95b7a427d8934e
Michael
11:27 AM
Amazing. Love how active the development is in this project.

3