Org.elasticsearch.index.mapper.MapperParsingException


(cjacobson) #1

Can I guarantee the appropriate data type is being indexed by defining
"properties" when defining my _mapping? So, in the below example, even if
the first document to be indexed incorrectly defines "username" as an
OBJECT, that will be the document which fails, instead of all subsequent
documents which define "username" correctly as a STRING.

EX:

curl -XPUT 'http://127.0.0.1/user_idx/directory_search/_mapping' -d '{
"directory_search" : {
"properties" : {
"state.username" : {"type":"string","store":"yes",
"index_analyzer":"standard"},
"state.firstname" : {"type":"string","store":"yes",
"index_analyzer":"standard"},
"state.lastname" : {"type":"string","store":"yes",
"index_analyzer":"standard"}
}
}
}'


(system) #2