In MySQL it is possible to put a specific record at the top/bottom of results by using ORDER BY document_id = 123 DESC.
Is this possible in Elasticsearch version 1.6?
I am doing a search for documents that match a term, and I want one of the documents with a particular field value to always appear at the top of the list, regardless of relevance, etc. The remainder of the documents, will appear in their default sort order right after wards.
The idea is to give an extra boost to all docs that match a given term with the help of function scoring. If your top doc has a special value which is unique, you can configure a ridiculous high boost value to achieve the desired effect.
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.