title: Test logstash with elasticsearch as input and output
body: <p>I have configured logstash with Elasticsearch as input and output paramaters as below :</p>
  
  <p>input</p>
  
  <pre><code>      {
           elasticsearch {
           hosts =&gt;  ["hostname" ]
          index =&gt; 'indexname'        
          type =&gt; 'type'
          user =&gt; 'username'      
          password =&gt; 'password'
          docinfo =&gt; true
          query =&gt; '{ "query": { "match": { "first_name": "mary" } }}'    
         }
       }
  </code></pre>
  
  <p>output</p>
  
  <pre><code>  {
     elasticsearch {
      hosts =&gt; ["hostname" ]
      index =&gt; 'indexname'                
      user =&gt; 'username'
      password =&gt; 'password'    
      }
     }
  </code></pre>
  
  <p>My indexed data is as below :</p>
  
  <pre><code>    PUT person/person/3 
      { 
       "first_name" : "mary" 
      }
      PUT person/person/4
      { 
      "first_name" : "mary.m" 
      }
       PUT person/person/5
      { 
      "first_name" : "mary.k" 
      }
  </code></pre>
  
  <p>When I run below query on ES </p>
  
  <pre><code>   GET indexname/_search
     {
      "query": {
       "match": {
         "first_name": "mary"
                 }
         }
        }
  </code></pre>
  
  <p>it returns</p>
  
  <pre><code>         {
     "took": 1,
       "timed_out": false,
         "_shards": {
           "total": 5,
          "successful": 5,
           "failed": 0
              },
            "hits": {
               "total": 1,
              "max_score": 0.2876821,
               "hits": [
                {
                 "_index": "person",
                   "_type": "person",
                     "_id": "3",
                  "_score": 0.2876821,
               "_source": {
               "first_name": "mary"
                         }
                      }
                   ]
                 }
               }
  </code></pre>
  
  <p>Although logstash pipeline has started successfully it does not log this query in ES as I had used query as "match": { "first_name": "mary"} in input section. </p>