How to get detail config of type?

If i use the URL (GET /qa/_mapping) to get field config , i will get this :

{
  "qa": {
    "mappings": {
      "questionAndAnswer": {
        "properties": {
          "answerCount": {
            "type": "integer"
          },
          "content": {
            "type": "text",
            "analyzer": "smartcn"
          }
        }
      }
    }
  }
} 

I can not know the field -- "type" whether be stored or be indexed .

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

It depends. Type integer is indexed and not stored. Look at the default values at https://www.elastic.co/guide/en/elasticsearch/reference/5.2/number.html

This is my mappings:

PUT /qa
{
  
  "settings": {
    "number_of_shards": 3,
    "number_of_replicas": 0
  }, 
  "mappings": {
    "questionAndAnswer":{
      "properties":{
        "answerCount":{
          "type": "integer",
          "index": false
        },
        "content":{
          "type": "text",
          "analyzer": "smartcn"
        }
      }
    }
  }
}

My question is how to know answerCount indexed?

I don't understand your question sorry.

But if you set index to false then it won't be indexed.

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