lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moray McConnachie <mmcco...@oxford-analytica.com>
Subject RE: Indexing multiple instances of the same field for each docume nt
Date Fri, 27 Feb 2004 15:00:44 GMT

> 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.

Yes, it works correctly by using a straight term query.

Does this mean that whenever I want to do keyword searches, I must avoid
QueryParser?

Is it also the case that QueryParser is comparatively slow? I haven't done
any heavy-duty testing of this, and of course the use of the .NET platform
may not be helping, but that is my perception.

Yours,
Moray
------------------------------------
Moray McConnachie, IT Manager
Oxford Analytica http://www.oxan.com 

> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Sent: 27 February 2004 10:29
> To: Lucene Users List
> Subject: Re: Indexing multiple instances of the same field for each
> document
> 
> 
> 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.
> 
> 	Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message