# Question regarding mapping

**URL:** <https://discuss.elastic.co/t/question-regarding-mapping/3789>\
**Category:** Elasticsearch\
**Created:** [January 17, 2011, 11:05am UTC](https://discuss.elastic.co/t/question-regarding-mapping/3789 "2011-01-17T11:05:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barak\_Yaish](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@Barak\_Yaish](https://discuss.elastic.co/u/Barak_Yaish)\
**Post date:** [January 17, 2011, 11:05am UTC](https://discuss.elastic.co/t/question-regarding-mapping/3789/1 "2011-01-17T11:05:27Z")

</div>

Hello,

In order to practice mapping, I've placed mapping.json under config/  
mapping/myindex, here is its content:

{  
"record":  
{  
"properties":  
{  
"sId" : {"type" : "integer", "index\_name" : "name1"}  
}  
}  
}

I've booting ES with empty data folder. After indexing some documents,  
searching them using the alias name (name1) I'm getting no results.  
Query with the field name (sId) works as expected. Am I using the  
correct location for the file? Putting it under config/mapping/  
\_default yield the same results.

Thanks.

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [January 17, 2011, 12:01pm UTC](https://discuss.elastic.co/t/question-regarding-mapping/3789/2 "2011-01-17T12:01:49Z")

</div>

config/mappings/\_default/yourmapping.json did it in my case

On 17 Jan., 12:05, barak [barak.ya...@gmail.com](mailto:barak.ya...@gmail.com) wrote:

> Hello,
> 
> In order to practice mapping, I've placed mapping.json under config/  
> mapping/myindex, here is its content:
> 
> {  
> "record":  
> {  
> "properties":  
> {  
> "sId" : {"type" : "integer", "index\_name" : "name1"}  
> }  
> }
> 
> }
> 
> I've booting ES with empty data folder. After indexing some documents,  
> searching them using the alias name (name1) I'm getting no results.  
> Query with the field name (sId) works as expected. Am I using the  
> correct location for the file? Putting it under config/mapping/  
> \_default yield the same results.
> 
> Thanks.

---

<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 6, 2017, 4:13am UTC](https://discuss.elastic.co/t/question-regarding-mapping/3789/3 "2017-07-06T04:13:46Z")

</div>


