lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Indexing multiple instances of the same field for each document
Date Fri, 27 Feb 2004 10:29:16 GMT
On Feb 27, 2004, at 5:16 AM, Moray McConnachie wrote:
> I note from previous entries on the mailing list and my own 
> experiments that
> you can add many entries to the same field for each document. Example: 
> a
> given document belongs to more than one product, ergo I index the 
> product
> field with values "PROD_A" and "PROD_B".
> If I don't tokenise the fields when adding them to the document, then 
> when
> storing the values and printing them out before adding them to the 
> index, so
> I can see what the index is recording, I do indeed get
> Keyword<product:PROD_A> Keyword <product:PROD_B>
> However, a query on product:PROD_A returns no results, neither does a 
> query
> on product:PROD_B.

Are you using QueryParser?  Try using a TermQuery("product", "PROD_A") 
when indexing as a Keyword and see what you get.  If that finds it, 
then you are suffering from analysis paralysis.  QueryParser, Keyword 
fields, and analyzers are a very "interesting" combination.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message