Algolia: Fetch records where both facet conditions are satisfied

113 views Asked by At

An example data structure of my record(s) are:

{
    foo: "bar",
    foo1: [
        { b1: "x", b2: "y" }
    ]
}

I am using React InstantSearch widgets where I have many refinement lists, two of which are on foo1.b1 and foo.b2 attributes.

Expectation - user selects value "x" for foo1.b1 attribute and "y" for foo1.b2 attribute. Records that have both values set should be returned. (AND condition).

Actual: Records where either foo1.b1 is "x" OR foo1.b2 is "y" are being returned.

Since I am using React InstantSearch widget and RefinementList, I am not sure how I can achieve the above. I looked at connectRefinmentList and virtual refinement lists but they seem to only work with a single attribute at a time.

Here's a Demo link of the issue.

Select Language as English and Language Level as Conversational.

Expected: Only Item # 3 and Item # 4 to show up.

Actual: All 4 items are seen.

0

There are 0 answers