Hi,
For example:
We have documents of a type "contact". A contact can be internal or external.
When searching for contacts, internal contacts should be ranked higher than external contacts.
What would be the best way to implement this?
Thanks!
Hi,
For example:
We have documents of a type "contact". A contact can be internal or external.
When searching for contacts, internal contacts should be ranked higher than external contacts.
What would be the best way to implement this?
Thanks!
Take a look at the Function Score Query. With the script_score
you have access to the fields in the document and also to the original search score, so it should be possible to boost the internal contacts by a fixed amount.
© 2020. All Rights Reserved - Elasticsearch
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.