lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ype Kingma <ykin...@xs4all.nl>
Subject Re: newbie: about grouping field
Date Thu, 12 Aug 2004 16:14:54 GMT
Fernando,

On Thursday 12 August 2004 17:44, Wermus Fernando wrote:
> Luceners
> I have to search a string in 30 fields. I know how to do it in a long
> way. I wanna know if exists a shorter way.
>
> String for searching: what's your name?
> Long way: +firstname:what's your name?  OR +lastname: what's your name?
> OR .......
>
> A shorter way: (firstname OR lastname OR ....):what's your name?
>
> Is it possible? Our searching is always the same kind of searching.

Two ways: org.apache.lucene.queryParser.MultiFieldQueryParser
or querying an extra field that contains all current fields to be searched.

The latter is normally faster, but takes more index space. It's normally
preferred when this type of query occurs frequently.
Also the query results might be ordered somewhat differently in both cases.

Kind regards,
Ype



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