lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: Searching Multivalued fileds
Date Tue, 11 Jan 2011 11:43:52 GMT

On Jan 11, 2011, at 2:55 AM, Sailesh wrote:

> 
> My index contains multivalued filed like and i use whitespaceAnalyzer
> DOC 1 : ITEMNAME: item 2 name
>           ITEMNAME: movie tickets
>           ITEMNAME: item 1 name
> so when search for (+ITEMNAME:item +ITEMNAME:movie), it should not match any
> document
> since there is no field which has both item and move, but it returns me the
> above doc.
> 
> Can any one please suggest how to handle this situation?
> 

Multivalued fields just get concatenated underneath the hood into a single field, in this
case itemname, with the position gap specified by the position increment.  If you didn't want
them to match, you could use a phrase query with a slop value less than the position increment.

-Grant


--------------------------
Grant Ingersoll
http://www.lucidimagination.com


Mime
View raw message