Question regarding mapping


(Barak Yaish) #1

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.


(Karussell) #2

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

On 17 Jan., 12:05, barak 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.


(system) #3