title: AND OR search syntax in lucene
body: <p>I am using Lucene. I have three columns which are</p>
  
  <pre><code>DocId - TermID - TermFrequency
   1    -   004  -      667
   2    -   005  -      558
  </code></pre>
  
  <p>If i use mysql then query for AND operation is </p>
  
  <pre><code>SELECT * FROM table_name WHERE DocId='1' AND TermId='004'
  </code></pre>
  
  <p>How can i write above query in Lucene using JAVA. For one column search code i am using is</p>
  
  <pre><code>Query query = new QueryParser(Version.LUCENE_35,"TermID", analyzer).parse("004");
  </code></pre>
  
  <p>How can i use AND operation in QueryParser ??</p>