#community-help

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

Apr 24, 2023 (7 months ago)
Jameshwart
Photo of md5-283d3397742c32cc2b6be6bda508c03e
Jameshwart
03:06 AM
hi 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
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:03 AM
If 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 AM
If 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
Photo of md5-283d3397742c32cc2b6be6bda508c03e
Jameshwart
03:51 AM
Thank you Jason

1