lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Carlson <carl...@bookandhammer.com>
Subject Re: Querying multiple fields of a index
Date Thu, 04 Apr 2002 15:28:26 GMT
Hi,

If you are using the queryParser and the standardAnalyzer you would use a
querystring like


title:lucene AND summary:engine


So the pattern is <field name>:<search string without spaces (unless your
searching a phrase)>

Also, you don't have to explicitly put the field name if you are searching
the default field.  That is if title is the default field the search would
be 

lucene AND summary:engine

Hope this helps.


--Peter


On 4/4/02 8:13 AM, "Harpreet S Walia" <xalanlist@yahoo.com> wrote:

> Hi,
> 
> Is it possible to query multiple fields of  a given index and get the result
> based on this combined query.
> i.e for example if  i want to serach for a word "lucene" in the title field
> and the word "engine" in the summary filed and want the results based on
> these words .
> 
> How can i achieve this ?
> 
> TIA
> 
> Regards
> Harpreet
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
> 
> 


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


Mime
View raw message