Excluding Specific Rows in TypesenseInstantSearchAdapter
TLDR Jameshwart needed to exclude an unwanted row in typesense search results. Jason suggested creating a scoped API key and using filter_by with a link to an article.
Powered by Struct AI
1
4
7mo
Apr 24, 2023 (7 months ago)
Jameshwart
Jameshwart
03:06 AMhi guys, im using instasearch TypesenseInstantSearchAdapter to search data and I have two collections being search but the problem is that it includes row that I don't want. So I need to put a condition to exclude a certain row if it equals to something. Can someone point me to the right direction for this? Thanks guys
Jason
Jason
04:03 AMIf you don’t want end users to be able to modify access to this record, I’d recommend creating a scoped api key and embed a filter inside it that excludes this record. Then use that api key to instantiate the adapter
04:19
Jason
04:19 AMIf you want to do it client side, here’s a detailed article on how to use filter_by: https://github.com/typesense/typesense-instantsearch-adapter/issues/17
Apr 27, 2023 (7 months ago)
Jameshwart
Jameshwart
03:51 AMThank you Jason
1
Typesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 3015 threads (79% resolved)
Similar Threads
Scoping API Keys to Exclude Specific Collection
Sveinbjorn asked if it's possible to scope API keys to exclude specific collections. Kishore Nallan advised opening a Github issue to request the feature.
6
8mo
Excluding Specific Documents in Typesense Results
Alexander asked how to exclude specific documents in Typesense search results, and Jason suggested using the hidden_hits search parameter and multi_search for large lists.
6
9mo
Querying TypeSense: Exclude Certain IDs from Array Field
Andrew asked if it's possible to exclude specific ids from an array in TypeSense, like Firestore's not-in array. Jason confirmed it's possible and shared how to do it, in addition to a reference link.
4
14mo