When changing a field in ES to text field (instead of keyword), it does not appear in CF


#1

Hi guys, I’m setting up an Elasticsearch index here and then trying to visualize the data in some widgets in ChartFactor Studio. I changed my “Summary” field in ES to a text field (instead of keyword), and now it doesn’t show up in CF. However, when I used a postman to do the lookup, I see that the field was returned. Are there any restrictions on CF?


#2

Hi @sebastian, thanks for reaching out. Please see this document on how to define a field in ES so that it supports both aggregation and text search: https://chartfactor.com/doc/latest/data_providers/elasticsearch/#case-insensitive-searches.

ChartFactor is not showing the “Summary” field in its list of available fields because it is not currently aggregetable as it is declared only as “text” in the index metadata. In this case, only ChartFactor’s search widget can make use of this field to perform searches. To have the “Summary” field support both aggregations as well as text searches, you would need to declare it as shown below:

"Summary": {
    "type": "text",
    "fields": {
        "keyword": {
           "type": "keyword",
           "null_value": "null",
           "ignore_above": 256
        }
    }
}

I hope this helps.


#3

Oh that’s nice, that solved my issue. Thanks @juan.dominguez.