I'm having a problem with keyword fields and how they're treated by QueryParser.
 
At indexing time, I index my documents, as follows:
 
 Content - tokenized, indexed field (the default field)
 DocType - not tokenized, indexed, stored field
 ....... - other fields
 
The analyzer I use utilizes Porter stemming.
 
At searching time, a query may come from the application's front end, as 
follows:
 
 +Content:"content model" AND DocType:xls
 
I use the same analyzer as the one used for indexing:
 
      QueryParser parser = new QueryParser("Content", getAnalyzer());
      Query query = parser.parse(strQuery); // strQuery is +Content:"content 
model" AND DocType:xls
 
When this Query is built, the second clause gets represented in it as 
DocType:xl -
I guess the 's' gets dropped due to the stemming.
 
What I have in the index is actually DocType:xls.  So, the query does not bring 
back the expected results.
 
Has anyone run into this issue? How do I work around it?
 
Thanks,
- Dmitry

Reply via email to