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:
// Add market_local to index
contactDocument.add(
new Field(
"market_local"
, StringUtils.objectToString(
currClip.get(
"market_local"
)
)
, Field.Store.YES
, Field.Index.UN_TOKENIZED
)
);
Running a query ( * ) against the index will return the following results:
Result 1:
title: Foo Bar
market_local: Local
Result 2:
title: Bar Foo
market_local: National
Running a targeted query:
+( market_local:Local )
won't find any results.
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.
UPDATE
Installed Luke, checking out latest index... the Field *market_local* is available in searches, so if I execute something like:
market_local:Local
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?