Terms query without sort

My document:

{
	"_index": "comb_index",
	"_type": "_doc",
	"_id": "i_ZFO3sB_48g2JrGjt9P",
	"_version": 2,
	"_seq_no": 5057859,
	"_primary_term": 1,
	"found": true,
	"_source": {
		"row": "54,9658",
		"value": 1481985587
	}
}
{
	"_index": "comb_index",
	"_type": "_doc",
	"_id": "jfZFO3sB_48g2JrGjt9P",
	"_version": 2,
	"_seq_no": 5057861,
	"_primary_term": 1,
	"found": true,
	"_source": {
		"row": "4,110178",
		"value": 1482000996
	}
}

I am using terms query as shown below:

value = [1481985587,1482000996,1482070894]
body = {"from": 0, "size": 100,"query": {"bool": {"must" : [{ "terms": { "value": value }}]}}}

how to get output in same order as value? I don't want to do any sorting, how can I achieve it in Elasticsearch?

You can not, so need to apply sorting.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.