How can I sort the result based on summation of several fields?
For my application, I want to sort the results based on ( ElasticSearch
score + field_1 + field_2 )
In fact:
Final Score = ElasticSearch score + field_1 + field_2
It seems kinda recursive, but I was wondering ES is able to do so.
On Wednesday, July 23, 2014 9:29:22 AM UTC-5, M_20 wrote:
Hi,
How can I sort the result based on summation of several fields?
For my application, I want to sort the results based on ( Elasticsearch
score + field_1 + field_2 )
In fact:
Final Score = Elasticsearch score + field_1 + field_2
It seems kinda recursive, but I was wondering ES is able to do so.
Failed to parse source
[{"from":0,"size":60,"query":{"flt":{"fields":["sentence"],"like_text":"disease"}},"explain":true," sort":[{"_script":{"script":"doc['journalscorenormal'].value","type":"float"}}]}]]];
nested: ScriptException[dynamic scripting disabled]; }
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:233)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$1.onFailure(TransportSearchTypeAction.java:179)
at
org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:523)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
On Wednesday, July 23, 2014 9:35:41 AM UTC-5, M_20 wrote:
On Wednesday, July 23, 2014 9:29:22 AM UTC-5, M_20 wrote:
Hi,
How can I sort the result based on summation of several fields?
For my application, I want to sort the results based on ( Elasticsearch
score + field_1 + field_2 )
In fact:
Final Score = Elasticsearch score + field_1 + field_2
It seems kinda recursive, but I was wondering ES is able to do so.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.