In 15.0 Snapshot versions, I am getting max_score value, only for
score field. If I use any other field means, am getting max_score as
null and in condition { "reverse":true} also getting null.
I here explained the queries what I was use.
- Search Query:
curl -XGET 'http://localhost:9200/dbtest/data/_search' -d' { "sort" :
[ {"_score" : {"reverse" :false } } ] ,"query" : { "bool" :
{ "should" : [{ "term" : { "field1":"123" } } ] } }, "from" : 0,
"size" : 20, "explain" : false,"fields":["field1","field2"] }'
Search Result:
{"took":0,"_shards":{"total":5,"successful":5,"failed":0},"hits":
{"total":1,"max_score":7.593729,"hits":
[{"_index":"dbtest","_type":"data","_id":"123","_score":
7.593729,"fields":{"field1":"123","field2":"test"}}]}}
- Search Query:
curl -XGET 'http://localhost:9200/dbtest/data/_search' -d' { "sort" :
[ {"field2":{"reverse":false}} ] ,"query" : { "bool" : { "should" :
[{ "term" : { "field1":"123" } } ] } }, "from" : 0, "size" : 20,
"explain" : false,"fields":["field1","field2"] }'
Search Result:
{"took":0,"_shards":{"total":5,"successful":5,"failed":0},"hits":
{"total":1,"max_score":null,"hits":
[{"_index":"dbtest","_type":"data","_id":"123","_score":null,"fields":
{"_fileid":"123","m_begdoc":"test"},"sort":["test"]}]}}