Skip to main content

You can try with this filtered query

{
  "size": 1000"query"1000,
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": {
            "exists": {
              "field": "fields.EventData.PGID"
            },
            {
              "term": {
                "run_id": "Run001"
              }
            }
          }
        }
      }
    }
  }
}

I think you can also add the sorting to the query

You can try with this filtered query

{
  "size": 1000"query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": {
            "exists": {
              "field": "fields.EventData.PGID"
            },
            {
              "term": {
                "run_id": "Run001"
              }
            }
          }
        }
      }
    }
  }
}

I think you can also add the sorting to the query

You can try with this filtered query

{
  "size": 1000,
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": {
            "exists": {
              "field": "fields.EventData.PGID"
            },
            "term": {
              "run_id": "Run001"
            }
          }
        }
      }
    }
  }
}

I think you can also add the sorting to the query

youYou can try with this filtered query :

q = {
  "size":1000
  "query"1000"query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": {
            "exists": {
              "exists""field": {"fields.EventData.PGID"
            },
    "field": "fields.EventData.PGID"       {
              },
"term": {
             {"term" : { "run_id" : "Run001"}},
              }
            }
          }
        }
      }
    }
  }
}

I think you can also add the sorting to the query

you can try with this filtered query :

q = {
  "size":1000
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": 
            {
              "exists": {
                "field": "fields.EventData.PGID"
              },
              {"term" : { "run_id" : "Run001"}},
             
            }
          
        }
      }
    }
  }
}

I think you can also add the sorting to the query

You can try with this filtered query

{
  "size": 1000"query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": {
            "exists": {
              "field": "fields.EventData.PGID"
            },
            {
              "term": {
                "run_id": "Run001"
              }
            }
          }
        }
      }
    }
  }
}

I think you can also add the sorting to the query

Source Link
ML_TN
  • 729
  • 6
  • 16

you can try with this filtered query :

q = {
  "size":1000
  "query": {
    "filtered": {
      "filter": {
        "bool": {
          "must": 
            {
              "exists": {
                "field": "fields.EventData.PGID"
              },
              {"term" : { "run_id" : "Run001"}},
             
            }
          
        }
      }
    }
  }
}

I think you can also add the sorting to the query