title: filtering results in ElasticSearch
body: <p>I have an ElasticSearch query that is coming up as being malformed, just not sure what it is I am doing wrong (no doubt somethign very obvious!)</p>
  
  <p>the query looks like this:</p>
  
  <pre><code>{ "query":
  { "filtered":
      { "query":
          { "field":
              { "product":"prodA or prodB" 
              } 
          }, 
          "filter":
              { 
                  "userid":"username" 
              } 
      } 
  }, 
  "size":10, "from":0 
  }
  </code></pre>
  
  <p>If I leave out the filter section, the query works just fine, so It must be something to do with the way I am using the filter option. </p>
  
  <pre><code>{ "query":
  { "filtered":
      { "query":
          { "field":
              { "product":"prodA or prodB" 
              } 
          }
  
      } 
  }, 
  "size":10, "from":0 
  }
  </code></pre>
  
  <p>How do I need to format this query to make it work?</p>