Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Elasticsearch Queries

Highlighted

Elasticsearch Queries

New Contributor

Using Nifi, it's possible to make this kind of request without destroy the original flowfile ?

curl -XPOST "http://localhost:9200/my_index/_search" -H 'Content-Type: application/json' -d'
{
  "query": {
    "bool": {
      "must": {
        "term": {
          "user.screen_name": "userName"
        }
      },
      "filter": {
        "range": {
          "date": {
            "gte": "now-3M",
            "lte": "now",
            "format": "EEE MMM dd HH:mm:ss Z YYYY"
          }
        }
      }
    }
  },
  "aggs": {
    "sum_RTs": {
      "sum": {
        "field": "retweetCount"
      }
    }
  }
}'

Thanks so much

1 REPLY 1
Highlighted

Re: Elasticsearch Queries

Rising Star

It is possible with a custom Processor, the out of the box processors supports query based on flowfile: https://community.hortonworks.com/questions/42727/using-invokehttp-flowfile-and-replacetext-from-nif...

Don't have an account?
Coming from Hortonworks? Activate your account here