#community-help

Troubleshooting Vector Search Setup in Typesense

TLDR Gio encountered issues setting up vector search using Typesense. Jason provided guidance and eventually offered to help via a call.

Powered by Struct AI

1

18
9mo
Solved
Join the chat
Feb 27, 2023 (9 months ago)
Gio
Photo of md5-fca9a1d3ceee0b8b4bedc936ea93e48b
Gio
11:26 AM
Hey guys 👋 I’m glad to be joined here. I’ve spent couple days already and can’t figure out how to build vector search using Typesense… Details in the thread so please help me out.

1. I’ve embedded a plain text using OpenAI.
2. I’ve created a collection by pasting the embedded list of vectors inside FIELD parameter.
3. When I go to search tab it only searches inside document title.
Have in mind I’m a nocode developer (Bubble io to be specific). So I’m trying to set this up correctly to then integrate Typesense to my app.

Guys could you please point me to right direction? I’m really desperate. I need to make this work… Jason
Image 1 for Hey guys :wave: I’m glad to be joined here. I’ve spent couple days already and can’t figure out how to build vector search using Typesense… Details in the thread so please help me out.

1. I’ve embedded a plain text using OpenAI.
2. I’ve created a collection by pasting the embedded list of vectors inside FIELD parameter.
3. When I go to search tab it only searches inside document title.
Have in mind I’m a *nocode developer* (Bubble io to be specific). So I’m trying to set this up correctly to then integrate Typesense to my app.

Guys could you please point me to right direction? I’m really desperate. I need to make this work… <@4L6c7>Image 2 for Hey guys :wave: I’m glad to be joined here. I’ve spent couple days already and can’t figure out how to build vector search using Typesense… Details in the thread so please help me out.

1. I’ve embedded a plain text using OpenAI.
2. I’ve created a collection by pasting the embedded list of vectors inside FIELD parameter.
3. When I go to search tab it only searches inside document title.
Have in mind I’m a *nocode developer* (Bubble io to be specific). So I’m trying to set this up correctly to then integrate Typesense to my app.

Guys could you please point me to right direction? I’m really desperate. I need to make this work… <@4L6c7>
04:54
Gio
04:54 PM
Kishore Nallan?🙏
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:53 PM
For vector search, you also need to generate the vector query to send to Typesense: https://typesense.org/docs/0.24.0/api/vector-search.html#nearest-neighbor-vector-search
06:54
Jason
06:54 PM
So if you were doing semantic search for eg, you would have to first take the query that the user typed in, send it to OpenAI, get the embeddings from their API, then send that to Typesense using the vector_query parameter
Gio
Photo of md5-fca9a1d3ceee0b8b4bedc936ea93e48b
Gio
07:06 PM
Jason that’s not an issue. The issue is when I type either a string or vector in Search Input it only searches in Title. Not in a vector.
Image 1 for <@4L6c7> that’s not an issue. The issue is when I type either a string or vector in Search Input it only searches in Title. Not in a vector.
07:07
Gio
07:07 PM
Image 1 for
07:07
Gio
07:07 PM
Image 1 for
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:07 PM
That’s because the “Query By” field under “Search Parameters” in your screenshot is set to “title” by default
07:08
Jason
07:08 PM
For regular keyword searches, it will use the fields specified in “query by”
Gio
Photo of md5-fca9a1d3ceee0b8b4bedc936ea93e48b
Gio
07:08 PM
Yes. And it doesn’t allow me to switch to vec… I know I’m doing smth wrong…
07:08
Gio
07:08 PM
Image 1 for
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:09 PM
For vector search, you want to use the “Additional Search Parameters” field right at the bottom, and then type this:

vector_query=vec:([0.96826, 0.94, 0.39557, 0.306488], k:100)
07:09
Jason
07:09 PM
(Replace the float array with your vectors)
Gio
Photo of md5-fca9a1d3ceee0b8b4bedc936ea93e48b
Gio
07:11 PM
Image 1 for
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:11 PM
Could you clear the search box and try again?
Gio
Photo of md5-fca9a1d3ceee0b8b4bedc936ea93e48b
Gio
07:12 PM
It’s the same error.
07:13
Gio
07:13 PM
Jason any chance I could get on a call with you to help me figure this out? I’d even pay you to help me set this up…
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:16 PM
Sure, let me DM you

1

Typesense

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

Indexed 3005 threads (79% resolved)

Join Our Community