# Simple question about mapping query

**URL:** <https://discuss.elastic.co/t/simple-question-about-mapping-query/49656>\
**Category:** Elasticsearch\
**Created:** [May 10, 2016, 1:10pm UTC](https://discuss.elastic.co/t/simple-question-about-mapping-query/49656 "2016-05-10T13:10:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![loez1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loez1/32/9274_2.png) [@loez1](https://discuss.elastic.co/u/loez1)\
**Post date:** [May 10, 2016, 1:10pm UTC](https://discuss.elastic.co/t/simple-question-about-mapping-query/49656/1 "2016-05-10T13:10:18Z")

</div>

Hi,

I need to know what does " **lib\_entite**" (line 3) mean in this query please ?

```
curl -XPUT 'localhost:9200/_mapping/region?ignore_conflicts=true' -d '{
	  "properties": {
	    "lib_entite": { 
	      "type": "string",
	      "analyzer": "standard",
	      "fields": {
		"folded": { 
		  "type": "string",
		  "analyzer": "folding"
		}
	      }
	    }
	  }
	}'

```

Thank you !

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [May 10, 2016, 2:43pm UTC](https://discuss.elastic.co/t/simple-question-about-mapping-query/49656/2 "2016-05-10T14:43:15Z")

</div>

Hmm, I think this API call is not formatted correctly. There are two options when adding the mapping:

Specify just the index in the URI, and include `mapping` in the body. E.g [stealing an example from the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html):

```
curl -XPUT localhost:9200/twitter -d ' // <--- 'twitter' index
{
  "mappings": { <--- 'mappings' reserved keyword
    "tweet": { <--- 'tweet' type
      "properties": { <--- 'properties' reserved keyword
        "message": { <--- 'message' is the name of the field in your doc
          "type": "string"
        }
      }
    }
  }
}'

```

The alternative structure is to define the index and type in the URI, which lets you drop the 'mapping' and type name from the body:

```
curl -XPUT localhost:9200/twitter/_mapping/tweet/ <-- 'twitter' index, 'tweet' type
{
  "properties": { <--- 'properties' reserved keyword
    "message": { <--- 'message' is the name of the field in your doc
      "type": "string"
    }
  }
}

```

So, getting back to your question, it looks like your request is somewhere in the middle. You've specified the index but not type in the URI, but have not specified 'mappings' or the type in the body.

To answer your actual question, the `lib_entite` string refers to a field name which is being mapped 🙂

---

<div class="post-metadata">

**Author:** ![loez1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loez1/32/9274_2.png) [@loez1](https://discuss.elastic.co/u/loez1)\
**Post date:** [May 10, 2016, 3:28pm UTC](https://discuss.elastic.co/t/simple-question-about-mapping-query/49656/3 "2016-05-10T15:28:56Z")

</div>

I spicified also the type in URL 🙂 is named **region**

`localhost:9200/_mapping/region`

Thank you very much for your answer ! I see now 😉

---

<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:** [July 5, 2017, 10:52pm UTC](https://discuss.elastic.co/t/simple-question-about-mapping-query/49656/4 "2017-07-05T22:52:42Z")

</div>

Closed on July 5, 2017, 10:52pm UTC


