Query Dsl Compound Clause

  • Combing leaf query clauses
  • bool frequently used and is simple to use:
    curl 'localhost:9200/orders/orders/_search?pretty=true' \
    -H 'content-type:application/json' \
    -d '{
    "query" : {
      "bool" : {
        "must" : {
          "term" : { "id" : "1" }
        },
        "should": {
          "query_string" : { 
              "query" : "trackingId:*" 
          }
        }
      }
    }
    }'
    

results matching ""

    No results matching ""