Best way to send never matching refinement in query #5327
-
Hi, We are currently using React Instant Search to provide a superb search engine to our users. In order to implement this feature, we "store in fronted" user favorites as a list of product id. When user toggle the checkbox, we send a disjunctive refinement of this list on However, as soon as he have no favorites yet, the reduce method will do nothing and so there will be no difference between checkbox toggled and untoggled. Our UX expectation is to have no ads returned when he is toggling the checkbox because he have no favorites yet. In this situation, what is the best practice to reach this user experience ? Note : Thanks in advance for your insights ! |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 1 reply
-
Hi, I think it's a fine idea. You can indeed refine with an id you know won't exist in the records, this will return an empty list of results in this case. |
Beta Was this translation helpful? Give feedback.
Hi, I think it's a fine idea. You can indeed refine with an id you know won't exist in the records, this will return an empty list of results in this case.