Re: max_score is not coming for query with filter search

2014-03-14 Thread Clinton Gormley
My first question is: why do you want the score? The score is used only for
sorting, and you're sorting on NODE_ID.

If you really want it (and there is a cost to computing the score) then you
can set track_scores to true.
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-sort.html#_track_scores

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPt3XKTHAbt0WP9NN_gJDjDb5%2BvViBs_ZVn-Zm2KknoX_dUyCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


max_score is not coming for query with filter search

2014-03-14 Thread Subhadip Bagui
Hi,

I'm doing the below query to fetch data date wise. But in the result the 
score is coming as null. How to get the score here.

curl -XPOST "10.203.251.142:9200/aricloud/_search" -d
'{
"query": {
"filtered": {
"query" : {
"match" : {
"CLOUD_TYPE" : "AWS-EC2"
}
},
"filter": {
"range": {
"NODE_CREATE_TIME": {
"to": "2014-03-14 18:43:55",
"from": "2014-03-14 16:22:32"
}
}
}
}
},
"sort" : {"NODE_ID" : "desc"},
"from" : 0,
"size" : 3
}'
==>
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"failed": 0
},
"hits": {
"total": 5,
"max_score": null,
"hits": [
{
"_index": "aricloud",
"_type": "nodes",
"_id": "4",
"_score": null,
"_source": {
"NODE_ID": "12334",
"CLOUD_TYPE": "AWS-EC2",
"NODE_GROUP_NAME": "DATABASE",
"NODE_CPU": "5GHZ",
"NODE_HOSTNAME": "virtualnode.aricent.com",
"NODE_NAME": "aws-node4",
"NODE_PRIVATE_IP_ADDRESS": "10.123.124.126",
"NODE_PUBLIC_IP_ADDRESS": "125.31.108.72",
"NODE_INSTANCE_ID": "asw126",
"NODE_STATUS": "STOPPED",
"NODE_CATEGORY_ID": "14",
"NODE_CREATE_TIME": "2014-03-14 16:35:35"
},
"sort": [
"12334"
]
}
]
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/21f413c0-1a13-4ebf-9a49-d43e3267e46b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.