question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"or" operator doesn't seem to work within a refinement list (disjunctive facet search).

See original GitHub issue

Hi 👋

Description

“or” operator don’t work within a refinement list.

Current behavior

When I click on a refinement list, only the options that have a document in common with the option selected are shown - even if the refinement list is set with the “or” operator.

So - when I have a refinement list with exclusive options (ie. none is shared by a document - in a belong_to/has_one association), I can only display a single option within the refinement list.

But - with the “or” operator, I’d like to see other options as well that I can select, so I can select two different options from the refinement list and see the documents that have either one or the other.

Screenshots or Logs

      searchBrands.addWidget(
        panelForIndustries({
          container: "#categories",
          attribute: "industry.name",
          showMore: true,
          autoHideContainer: true,
          keepZeroFacets: true,
          operator: "or"
        })
      );

Behaviour - I have industries to search on brands. Each brand can only have one industry.

Before selecting anything:

Screenshot 2022-07-04 at 23 41 53

Here’s what I’d like as a result (using Algolia, which set the default operator as “or” - so I can select and view results from two different industries - as I would expect using the “or” attribute)

Screenshot 2022-07-04 at 23 41 59

Here’s the actual result by Meilisearch (the default operator being “and” - and the setting in the RefinementList doesn’t seem to work)

Screenshot 2022-07-04 at 23 42 05

Environment (please complete the following information):

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
bidoubiwacommented, Oct 18, 2022

Working on it for the moment! We have been slowed down with hacktoberfest unfortunately

2reactions
bidoubiwacommented, Dec 15, 2022

The disjunctive search beta is released! Can you try it out? It is published on npm here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change operator from or to and refine the result in Refinement ...
Hi, I am using RefinementList to filtering facets in algolia. Currently I am using algolia default “operator:or” for facets filtering in the RefinementList....
Read more >
Feature-Request: Hierarchical Menu as a disjunctive facet #24
Need Hierarchical Menu that is disjunctive. react-instantsearch 3.2.1 is current;y being used Similar to Refinement List but in a tree format.
Read more >
Algolia Instantsearch: custom sort refinementlist - Stack Overflow
In our situation I have a 'rank' attribute on each of my refinement list items but I can't access it as the API...
Read more >
algoliasearch-helper - UNPKG
It doesn't do the search itself,\n * nor does it contains logic about the parameters.\n * It is an immutable object, therefore it...
Read more >
Manage Query Pipeline Conditions - Coveo Documentation
Click the desired rule, and then click More in the Action bar. On the subpage that appears, click Create a new condition. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found