Troubleshooting Typesense Instantsearch Adapter's 'filters' Property
TLDR Carl was unable to use the filters
property of Typesense Instantsearch adapter for network call. Jason suggested using a scoped API key to combine filters and also recommended experimenting with dynamic filtering rules for multiple product numbers. Carl is satisfied with these solutions.
2
1
1
Mar 25, 2022 (19 months ago)
Carl
10:06 AMfilters
property for <Configure>
also work (docs) for Typesense? I have tried setting it but nothing seems to make it to the network call to Typesense.I have used
facetFilters
previously which works great, though we can't set that and use a RefinementList at the same time. I was hoping using the filters
property would somehow combine the values for us properly as described in this issue.Jason
10:26 AMJason
10:27 AMJason
10:27 AMJason
10:28 AMCarl
10:34 AMI can have a try though, it's the best I have right now ๐
Jason
10:35 AMCarl
10:37 AMThis filtering would need to happen further along the process. I was about to try base64 decode the key and try modify the filter that way, to see if it worked
Jason
04:19 PMThat wouldn't work unfortunately. It's meant to not be decodable for ACL purposes.
1
Jason
04:20 PM1
Mar 28, 2022 (19 months ago)
Carl
06:26 AMWhat we have, is a search box, that when the user enters some text, we try to see if it contains numbers with length of 6. In this case, we assume the user wants to search on a bunch of product numbers, so we switch from doing a normal search query to just do a "*" and then filter on "product_number:<query_number>".
However, it could be that the user then wants to filter this result further, by using the refinements on the left. Which is where we hit the problem of the
<Configure>
not combining with the refinements.Hope that makes sense
Carl
06:30 AMMar 31, 2022 (19 months ago)
Carl
05:47 AMJason
03:51 PMDoes this not filter down to a single record? Sounds like there are multiple records with the same product number?
Jason
03:53 PMSomething like:
{
"rule": {
"query": "{product_number}",
"match": "contains"
},
"filter_by": "product_number:={product_number}",
"remove_matched_tokens": true
}
1
Apr 01, 2022 (19 months ago)
Carl
07:37 AMI had come across the dynamic filtering rules, but didn't experiment with it. Would it work if there's 10 different product numbers? How about if there's a mix of different numbers? Such as:
"<product_number> <product_number> <ean> <product_number> <sub_product_number>"
If I were to make 3 rules, each targeting the different number types, they would all apply to a
filter_by
and be removed from the query? Assumiing remove_matched_tokens
is true
of course.Jason
04:11 PMYup, you also want to create different rules for each field, like you mentioned
Apr 04, 2022 (19 months ago)
Carl
06:26 AM1
Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
Modifying Typesense's OR on filter_by & Multi-Query Workaround
Carl inquired about Typesense's OR on filter_by and multi-query workaround. Kishore Nallan gave an estimated timeline and a workaround for the OR query. Jason suggested custom widget creation for precise search queries and Dynamic Filtering rule set up.
Fixing Multiple Document Retrieval in Typesense
Phil needed an efficient way to retrieve multiple documents by id. Kishore Nallan proposed a solution available in a pre-release build. After some bug fixing regarding id matching by Jason and Kishore Nallan, Phil successfully tested the solution.
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.
Typesense Products Filtering Issue with Mixed AND+OR Filtering
Dmytro faced issues in implementing mixed AND+OR filtering for product filtering on Typesense using `'typesense-instantsearch-adapter'` despite using several approaches and facets. Jason suggested increasing the number of facets fetched and trying a different server version but the issue remains.
Typesense Ecommerce Storefront Showcase Discussion
Mica discussed enhancements and filters for an ecommerce storefront using Typesense. Jason offered resources on filters and handling facets count issues reported by Claudiu. Jason also implemented a solution to fix the problem.