I have a mapping http://pastebin.com/SQxpD2cn:
{
"default":{
"properties":{
"EVENT_KEY":{
"type":"multi_field",
"fields":{
"EVENT_KEY":{
"type":"string",
"index":"analyzed"
},
"not_analyzed":{
"type":"string",
"index":"not_analyzed"
}
}
},
"SYSTEM":{
"type":"multi_field",
"fields":{
"SYSTEM":{
"type":"string",
"index":"analyzed"
},
"not_analyzed":{
"type":"string",
"index":"not_analyzed"
}
}
},
"EVENT_TIME":{
"type":"multi_field",
"fields":{
"EVENT_TIME":{
"type":"string",
"index":"analyzed"
},
"not_analyzed":{
"type":"string",
"index":"not_analyzed"
}
}
},
"OUTCOME":{
"type":"multi_field",
"fields":{
"OUTCOME":{
"type":"string",
"index":"analyzed"
},
"not_analyzed":{
"type":"string",
"index":"not_analyzed"
}
}
},
"USER":{
"type":"multi_field",
"fields":{
"USER":{
"type":"string",
"index":"analyzed"
},
"not_analyzed":{
"type":"string",
"index":"not_analyzed"
}
}
}
}
}
}
When I try to search against the index (e.g.,
http://localhost:9200/indexName/_search) with thishttp://pastebin.com/LvfNHUNh
:
{
"sort" : [
"USER.not_analyzed" : { "order" : "desc" }
]
}
...the results don't actually come back sorted by USER.not_analyzed. I know
elasticsearch knows the field is in there, because I search on gibberish -
e.g., "USER.not_there" - I get an error response. Can someone tell me what
I'm doing wrong?