Linked Questions

Popular Questions

curl --location --request GET 'http://10.24.33.115/shipment/_search' \
--header 'Content-Type: application/json' \
--data-raw '{
  "query": {
    "bool": {
      "filter": {
        "bool": {
          "must": [
            {
              "term": {
                "seller_id": "667385ca20714447"
              }
            },
            {
                "term": {
                    "is_mps": false
                }
            },
            {
              "term": {
                "units.state": "payment_approved"
              }
            },
            {
              "term": {
                "service_profile": "NON_FBF"
              }
            },
            {
              "range": {
                "updated_at": {
                  "from": "now-3M",
                  "include_lower": true
                }
              }
            }
          ],
          "should": [
            {
              "term": {
                "units.hold": true
              }
            },
            {
              "range": {
                "dispatch_after_date": {
                  "from": "now",
                  "include_lower" : true
                }
              }
            }
          ]
        }
      }
    }
  },
  "post_filter": {
    "range": {
      "updated_at": {
        "from": "now-3M",
        "include_lower": true
      }
    }
  }
}'



curl --location --request GET 'http://10.24.36.178/shipment/_search' \
--header 'Content-Type: application/json' \
--data-raw '{
  "query": {
    "bool": {
      "filter": {
        "bool": {
          "must": [
            {
              "term": {
                "seller_id": "667385ca20714447"
              }
            },
            {
                "term": {
                    "is_mps": false
                }
            },
            {
              "term": {
                "units.state": "payment_approved"
              }
            },
            {
              "term": {
                "service_profile": "NON_FBF"
              }
            },
            {
              "range": {
                "updated_at": {
                  "from": "now-3M",
                  "include_lower": true
                }
              }
            }
          ],
          "should": [
            {
              "term": {
                "units.hold": true
              }
            },
            {
              "range": {
                "dispatch_after_date": {
                  "from": "now",
                  "include_lower" : true
                }
              }
            }
          ]
        }
      }
    }
  },
  "post_filter": {
    "range": {
      "updated_at": {
        "from": "now-3M",
        "include_lower": true
      }
    }
  }
}'

These are above curl, for es2 cluster and es7 cluster

What can be the case the query is not working properly. While using "minimum_should_match" : 1 we are getting zero count,

is it correct way to go ahead.

There might be some wrong with the query, can you help me in that

Also note when I fire them individually, I hope I am not making some silly mistake, but I am almost sure I am not missing anything.

Related Questions