Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 495 Bytes

QueryDslCompound.md

File metadata and controls

25 lines (21 loc) · 495 Bytes

Query Dsl Compound Clause

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