Excluding Specific Documents in Typesense Results
TLDR 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.
Mar 26, 2023 (8 months ago)
• A user uses a few filters and search for some documents.
• The user is allowed to i.e. "ignore" documents in the results to not see those again.
How would I tell Typesense to not include these results - depending on the user searching?
A few options I researched:
• Long queries: Simply use a filter, but use very long queries if many results are excluded
• Overrides: Have a list of excluded documents per user which will still be a long query, just at a different time as I have not found a way to "add conditions" instead of creating full lists
How would you guys implement this, especially for large amounts of excludes? 🙂
Indexed 3015 threads (79% resolved)
Using Typesense to Search Specific Document IDs
Tshepo inquired about performing specific document ID searches in Typesense. Jason advised using the `filter_by=id:=[1,2,3,etc]` function or directly querying Typesense.
Excluding Documents in Search Results Based on Criteria
Jameshwart wanted to exclude certain documents in search results. Elian provided a link for assistance and Jason gave advice on overriding preset parameters.
Troubleshooting exclude_fields in Typesense
Vadali reported an issue with exclude_fields, but later discovered a bug in their own query.