title: Troubleshoot Java Lucene ignoring Field
body: <p>We're currently using Lucene 2.1.0 for our site search and we've hit a difficult problem: one of our index fields is being ignored during a targeted search. Here is the code for adding the field to a document in our index:</p>
  
  <pre><code>// Add market_local to index
  contactDocument.add(
      new Field(
          "market_local"
          , StringUtils.objectToString(
              currClip.get(
                  "market_local"
              )
          )
          , Field.Store.YES
          , Field.Index.UN_TOKENIZED 
      )
  );
  </code></pre>
  
  <p>Running a query ( * ) against the index will return the following results:</p>
  
  <pre><code>Result 1:
      title: Foo Bar
      market_local: Local
  
  Result 2:
      title: Bar Foo
      market_local: National
  </code></pre>
  
  <p>Running a targeted query:</p>
  
  <pre><code>+( market_local:Local )
  </code></pre>
  
  <p>won't find any results.</p>
  
  <p>I realize this is a highly specific question, I'm just trying to get information on where to start debugging this issue, as I'm a Lucene newbie.</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Installed Luke, checking out latest index... the Field <em>market_local</em> is available in searches, so if I execute something like:</p>
  
  <pre><code>market_local:Local
  </code></pre>
  
  <p>The search works correctly (in Luke). I'm going over our Analyzer code now, is there any way I could chalk this issue up to the fact that our search application is using Lucene 2.1.0 and the latest version of Luke is using 2.3.0?</p>