WL
03/18/2023, 5:52 AMadditionalSearchParameters
or collectionSpecificSearchParameters
eg.
const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
server: {
apiKey: 'Search-only api key', // Search-only api key
nodes: [
{
host: '<http://xxx.a1.typesense.net|xxx.a1.typesense.net>', // For Typesense Cloud use <http://xxx.a1.typesense.net|xxx.a1.typesense.net>
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',
});
WL
03/18/2023, 6:30 AMJason Bosco
03/19/2023, 9:03 PMWL
03/20/2023, 2:39 AMWL
03/20/2023, 2:42 AMcollectionSpecificSearchParameters: {
docs: {
vector_query: 'location',
},
}
the search box is disabled for some reason.Jason Bosco
03/20/2023, 4:31 PMvector_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-search