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

**URL:** <https://discuss.elastic.co/t/kibana-5-2-how-to-set-searchable-or-aggregatable/74810>\
**Category:** Kibana\
**Created:** [February 12, 2017, 2:36pm UTC](https://discuss.elastic.co/t/kibana-5-2-how-to-set-searchable-or-aggregatable/74810 "2017-02-12T14:36:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![allegro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/allegro/32/15441_2.png) [@allegro](https://discuss.elastic.co/u/allegro)\
**Post date:** [February 12, 2017, 2:36pm UTC](https://discuss.elastic.co/t/kibana-5-2-how-to-set-searchable-or-aggregatable/74810/1 "2017-02-12T14:36:11Z")

</div>

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.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/9/941f7c3cd5dcbca8669a5cb5dd9c46b4f76e73a5.png)

```
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.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 13, 2017, 3:30am UTC](https://discuss.elastic.co/t/kibana-5-2-how-to-set-searchable-or-aggregatable/74810/2 "2017-02-13T03:30:57Z")

</div>

> [@allegro](#):
>
> "type": "string",  
> "index": "not\_analyzed"

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

---

<div class="post-metadata">

**Author:** ![allegro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/allegro/32/15441_2.png) [@allegro](https://discuss.elastic.co/u/allegro)\
**Post date:** [February 13, 2017, 4:51am UTC](https://discuss.elastic.co/t/kibana-5-2-how-to-set-searchable-or-aggregatable/74810/3 "2017-02-13T04:51:34Z")

</div>

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

> [@allegro](#):
>
> ```
> "id": {
> "type": "integer"
> },
> "timestamp": {
> "type": "date"
> },
> 
> ```

---

<div class="post-metadata">

**Author:** ![allegro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/allegro/32/15441_2.png) [@allegro](https://discuss.elastic.co/u/allegro)\
**Post date:** [February 13, 2017, 2:02pm UTC](https://discuss.elastic.co/t/kibana-5-2-how-to-set-searchable-or-aggregatable/74810/4 "2017-02-13T14:02:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sharatj](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sharatj](https://discuss.elastic.co/u/sharatj)\
**Post date:** [February 13, 2017, 3:57pm UTC](https://discuss.elastic.co/t/kibana-5-2-how-to-set-searchable-or-aggregatable/74810/5 "2017-02-13T15:57:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 13, 2017, 3:57pm UTC](https://discuss.elastic.co/t/kibana-5-2-how-to-set-searchable-or-aggregatable/74810/6 "2017-03-13T15:57:48Z")

</div>

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