Skip to content

Queries to return data

Krzysiek Madejski edited this page Jun 11, 2018 · 1 revision

Both of these below seem to return similar results:

"minimum_should_match": 1,
      "should": [
          {"match":{
           "text": $query  
          }},
          {"match": {
           "data.web_objects_versions.title"  : $query
          }},
          {"match": {
           "data.web_objects_versions.url"    : $query
          }}
      ]
"must": [
        {
          "multi_match": {
            "type": "cross_fields",
            "query": $query,
            "fields": [
              "data.web_objects_versions.title",
              "data.web_objects_versions.url",
              "text"
            ]
          }
        }
      ]
Clone this wiki locally