Quotidien Shaarli

Tous les liens d'un jour sur une page.

May 23, 2024

Query string query | Elasticsearch Guide [7.17] | Elastic

Since several queries are generated from the individual search terms, combining them is automatically done using a dis_max query with a tie_breaker. For example (the name is boosted by 5 using ^5 notation):

GET /_search
{
  "query": {
    "query_string" : {
      "fields" : ["content", "name^5"],
      "query" : "this AND that OR thus",
      "tie_breaker" : 0
    }
  }
}