ais-refinement-list in VueInstantSearch(Algolia) doesn't renders list

1.3k Views Asked by At

I have stucked with an issue using refinement list widget of algolia. First of all my resulting data structure is like that:

[
   {
      objectID: 999,
      title: 'some title',
      categories: [
        {
           id: 444,
           name: 'some name',
        },
        {...},
      ]
   }
]

I have that type of structure on my page:

    <ais-instant-search
      :search-client="searchClient"
      :initial-ui-state="{
        index_Name: { query: searchedValue },
      }"
      index-name="index_Name"
    >
        <ais-index index-name="index_Name">
            <ais-configure
              :filters="facetsFilters"
              :facets="['categories.id']"
              :hits-per-page.camel="items"
            />
            <ais-refinement-list attribute="categories.id" />
            <div> ...Some other widgets nested in divs as ais-search-box, ais-sort-by, etc </div>
        </ais-index>
    </ais-instant-search>

Within ais-configure I have passed to filters a facetsFilters variable which contains string with such content:

"categories.id:1 OR categories.id:5"

and it works ok, I'm getting results within selected categories, problems starts, when i try to get refinement-list here:

<ais-refinement-list attribute="categories.id" />

I have an empty list despite that on dashboard this attribute is added as an attributesForFacetings and in ais-configure filters parameters with categories.id in it also works well.

Any suggestions is highly appreciated !

1

There are 1 best solutions below

0
On BEST ANSWER

Problem was in Dashboard of Algolia. When we clicked on 'searchable' instead of 'filter only' radiobutton for chosen attributeForFaceting - everything starts working good.