Kibana 5.2, How to set "searchable" or "aggregatable"


#1

Hi, I'm using Elasticsearch 5.2 and Kibana 5.2 on macOS 10.12.3.

After the mapping api as below on kibana console on developping Tools menu,
searchable and aggregatable menus on any field on this index wont be checked.

PUT test
{
  "mappings": {
    "logs": {
      "_source": {
        "enabled": true
      },
      "_all": {
        "enabled": true
      },
      "properties": {
        "id": {
          "type": "integer"
        },
        "timestamp": {
          "type":   "date"
        },
        "customer_id": {
          "type": "integer"
        },
        "customer_name": {
          "type": "string",
          "index": "not_analyzed"
        },
        "description": { 
          "type": "string",
          "index": "analyzed"
        }
      }
    }
  }
}

How can I set searchable and aggregatable on these fields to yes?

  • when I input the data to elastic search without mappings, searchable/aggregatable on these fields are checked. what the difference,,,. I'm not make sense.

(Mark Walkom) #2

It's those.
However you should switch to the keyword data type.


#3

thanks! but these fields (id, timestamp) are also not searchable.
do these fields also need to change keyword for searchable??


#4

Thanks, warkolm.
I changed the mappings as below.

{
  "mappings": {
    "logs": {
      "_source": {
        "enabled": true
      },
      "_all": {
        "enabled": true
      },
      "properties": {
        "id": {
          "type": "integer"
        },
        "timestamp": {
          "type":   "date"
        },
        "customer_id": {
          "type": "integer"
        },
        "customer_name": {
          "type": "keyword"
        },
        "description": { 
          "type": "string",
          "index": "analyzed"
        }
      }
    }
  }
}

but situation is not changed. Kibana still cannot set the status to searchable.

In case, I cannot use the non-searchable field in dashboards.

Any idea?


Kibana Visualize doesn't allow to aggregate any field other than _type
Diskio Fields Are Not available To Create Visualization
#5

What I observed in the past is that none of the fields are marked searchable until there's some data in the index. Also, once the data is inserted, make sure you refresh your index.


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.