How to get detail config of type?


(Ming zhang) #1

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 .


(David Pilato) #2

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


(Ming zhang) #3

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?


(David Pilato) #4

I don't understand your question sorry.

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


(system) closed #5

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