I want to configure the ElasticSearch so that it after calculating the
score of each document corresponding to a user query, it sorts those score
documents by some other field and then give the response. There may be a
case in which some documents have same score. I want Elasticsearch to sort
those same scoring documents on some other field. That's why needed this
functionality. Can anyone tell me how can I add this functionality to my
mapping ?
I want to configure the Elasticsearch so that it after calculating the
score of each document corresponding to a user query, it sorts those score
documents by some other field and then give the response. There may be a
case in which some documents have same score. I want Elasticsearch to sort
those same scoring documents on some other field. That's why needed this
functionality. Can anyone tell me how can I add this functionality to my
mapping ?
Actually my code is in java. I have seen those links but not able to
implement it in my code. I'm using customscorequerybuilder for building my
query. How can I use this sort in my code. Is there any java api for this ?
Also, Can I do this sort in my mapping itself ?
Thanks
On Wed, Jan 22, 2014 at 3:22 AM, Ivan Brusic ivan@brusic.com wrote:
I want to configure the Elasticsearch so that it after calculating the
score of each document corresponding to a user query, it sorts those score
documents by some other field and then give the response. There may be a
case in which some documents have same score. I want Elasticsearch to sort
those same scoring documents on some other field. That's why needed this
functionality. Can anyone tell me how can I add this functionality to my
mapping ?
Actually my code is in java. I have seen those links but not able to
implement it in my code. I'm using customscorequerybuilder for building my
query. How can I use this sort in my code. Is there any java api for this ?
Also, Can I do this sort in my mapping itself ?
Thanks
On Wed, Jan 22, 2014 at 3:22 AM, Ivan Brusic ivan@brusic.com wrote:
I want to configure the Elasticsearch so that it after calculating the
score of each document corresponding to a user query, it sorts those score
documents by some other field and then give the response. There may be a
case in which some documents have same score. I want Elasticsearch to sort
those same scoring documents on some other field. That's why needed this
functionality. Can anyone tell me how can I add this functionality to my
mapping ?
I tried doing the above thing in my code but it seems there is no
scoreSort() method. Are you the last sorting needs to be done this way :
addSort(scoreSort().
order(SortOrder.DESC));
Thanks
On Thu, Jan 23, 2014 at 12:51 AM, Ivan Brusic ivan@brusic.com wrote:
Actually my code is in java. I have seen those links but not able to
implement it in my code. I'm using customscorequerybuilder for building my
query. How can I use this sort in my code. Is there any java api for this ?
Also, Can I do this sort in my mapping itself ?
Thanks
On Wed, Jan 22, 2014 at 3:22 AM, Ivan Brusic ivan@brusic.com wrote:
I want to configure the Elasticsearch so that it after calculating the
score of each document corresponding to a user query, it sorts those score
documents by some other field and then give the response. There may be a
case in which some documents have same score. I want Elasticsearch to sort
those same scoring documents on some other field. That's why needed this
functionality. Can anyone tell me how can I add this functionality to my
mapping ?
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.