0

I am using the following logstash configuration file to feed the kafka topic data and sending it to elasticsearch

input {
    kafka {
        bootstrap_servers => "localhost:9092"
        topics => ["LDAP"]
    }
}

output {
        elasticsearch {
        hosts => "localhost"
        index => "LDAP"
        }
}

Assuming all the data from the topic is sent to elasticsearch, what is the way to query elasticsearch with the index?

Prashant
  • 1,144
  • 8
  • 17
  • 28

1 Answers1

0
GET LDAP/_search
{
  "query": {
    "match_all": {}
  }
}

--> curl command

curl -XGET 'localhost:9200/LDAP/_search -d '
{
    "query" : {
        "match_all" : {}
    }
}'  

This query will return all the documents from the LDAP index

Let me know if you don't get any hits with this query

prasad kp
  • 833
  • 1
  • 10
  • 32