searchkit: RefinementListFilter can't access certain data in json searchkit: RefinementListFilter can't access certain data in json json json

searchkit: RefinementListFilter can't access certain data in json


The problem is within the field indices of your elasticsearch instance. According to the docs, Searchkit needs two different kinds of indexed fields for searching and filtering.

In your case it seems like the field author is not indexed correctly.

To solve this, you need to change the elasticsearch mapping for the field author:

    ...    "meta": {      "properties": {        "author": {          "type": "text",             "fields": {                "raw": {                    "type": "keyword"                }            }    ...

You can then access the authors in the Refinementfilter via

<RefinementListFilter id="author" title="Author" field={"meta.author.raw"}/>


Try to restructure your JSON file for distinct clarification. You need two different fields for searching and filtering.

"meta": {      "properties": {        "author": {          "type": "text",             "fields": {                "val": {                    "type": "keyword"                }            }

While in a Refinementfilter, it can be accessed this way

<RefinementListFilter id="Author" title="Author" field={"meta.author.val"}/>