Issues with Search UI for Vector Search
TLDR WL is building a search UI for vector search and having issues with syntax, while Jason provides context on the issue.
Powered by Struct AI
6
6mo
Mar 18, 2023 (7 months ago)
WL
WL
05:52 AMHas anyone tried building a search UI for vector search? I tried customizing from the InstantSearch.js but I can't seem to search by vectors? What I did was to index a document into Typesense. Then I tried to see if I can search using the search bar, and it doesn't seem to work? Wasn't sure about the syntax for
or
eg.
additionalSearchParameters
or
collectionSpecificSearchParameters
eg.
const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
server: {
apiKey: 'Search-only api key', // Search-only api key
nodes: [
{
host: '', // For Typesense Cloud use
port: '443', // For Typesense Cloud use 443
protocol: 'https', // For Typesense Cloud use https
},
],
},
// The following parameters are directly passed to Typesense's search API endpoint.
// So you can pass any parameters supported by the search endpoint below.
// queryBy is required.
// filterBy is managed and overridden by InstantSearch.js. To set it, you want to use one of the filter widgets like refinementList or use the `configure` widget.
additionalSearchParameters: {
query_by: 'title'
},
collectionSpecificSearchParameters: {
docs: {
query_by: 'location',
},
},
});
const searchClient = typesenseInstantsearchAdapter.searchClient;
const search = instantsearch({
searchClient,
indexName: 'docs',
});
06:30
Mar 19, 2023 (6 months ago)
Jason
Jason
09:03 PMHere’s more context on this: https://github.com/typesense/typesense-instantsearch-adapter/issues/152#issuecomment-1448527144
Mar 20, 2023 (6 months ago)
WL
WL
02:39 AMDoes this means in the current adapter, there's no way to pass the vector field as a param within additionalSearchParameters/collectionSpecificSearchParameters? So I wouldn't be able to search via vectors in the search box and have the search results displayed using the hits widget?
02:42
WL
02:42 AMBecause when I tried specifying the vector field in collectionSpecificSearchParameters as per the issue thread, eg.
the search box is disabled for some reason.
collectionSpecificSearchParameters: {
docs: {
vector_query: 'location',
},
}
the search box is disabled for some reason.
Jason
Jason
04:31 PMYou can indeed pass
vector_query
in collectionSpecificSearchParameters
or additionalSearchParameters
, but you’d need to pass in the embeddings in the vector_query format, like in this code sample: https://typesense.org/docs/0.24.0/api/vector-search.html#nearest-neighbor-vector-searchTypesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 2779 threads (79% resolved)
Similar Threads
Troubleshooting Typesense Setup and Understanding Facets and Keywords
Demitri encountered errors when exploring Typesense for the first time. Jason guided them through troubleshooting and discussed facets, keyword settings, and widget configurations. Helin shared a Python demo app and its source code to help Demitri with their project.
56
19mo
Solved
Vector Search with InstantSearch.js in Typesense
Noorhalim asked how to use vector search via instantsearchjs. Jason provided a link to a nearby discussion, but additional questions by Noorhalim remain unanswered.
4
7mo
Troubleshooting Vector Search Setup in Typesense
Gio encountered issues setting up vector search using Typesense. Jason provided guidance and eventually offered to help via a call.
18
7mo
Solved