title: Lucene Boolean query not working in dot net
body: <p>I am using Lucene dot net version 2.9 and constructed my query as following (GetQuery method). I could get the results from the same index using Luke tool with the same query. But not via dotnet API. Not sure is that a bug in Lucene.net? or a mistake on my part. Indexing is done with standard analyzer and analyzed all the fields that I am searching. </p>
  
  <p>Note: It is working with Luke with the same index. I am using .net lucene 2.94 not Java Lucene libraries</p>
  
  <p>The query that is working with Luke tool is this: </p>
  
  <p><strong>+(content:polaris location:polaris) +ext:/pdf/xls/doc/docx</strong></p>
  
  <p>Here is the c# code that is NOT working:</p>
  
  <pre><code>    private static BooleanQuery GetQuery(string term, string exts)
      {
          string[] fields = { MetaKeys.Content, MetaKeys.Location };
          MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_29));
  
          Query multiFieldQuery = parser.Parse(term);
          TermQuery extQuery = new TermQuery(new Term(MetaKeys.Ext, exts));
  
          BooleanQuery combinedQuery = new BooleanQuery();
          combinedQuery.Add(multiFieldQuery, BooleanClause.Occur.MUST);
          if (extQuery != null)
          {
              combinedQuery.Add(extQuery, BooleanClause.Occur.MUST);
          }
  
          return combinedQuery;
      }
  </code></pre>
  
  <p>And it is used as following</p>
  
  <pre><code>        string exts = "/pdf/xls/doc/docx";
          BooleanQuery combinedQuery = GetQuery(term, exts);
  
          TopDocs docs = indexSearch.Search(combinedQuery, to);
  
          //resulting in 0 Hits
  </code></pre>
  
  <p><strong>Note to folks who closed my earlier question: give the original poster a chance (at least 24-hours) to correct it before you are going to close the question.</strong> </p>