I want to run a query string query, meaning to query the "_all" field, but I would like to score higher a document in which the term I searched for was in a specific field.
For example, i want to search the term "john" over a "person" type (using a query string query because I want everything that's connected to john somehow), but if john appears in the field "name", I want to score it higher than a document in which "john" appears in the field "street".
You can add your must() with John on _all field and a should() on the field name = John. So that documents with John in the name will have a best score.
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.