You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by jitender ahuja <aj...@aalayance.com> on 2004/06/29 10:20:24 UTC

ANDing and ORing of indexed fields

Hi All,
           I want  options 'AND' as well as 'OR' to be exercised upon the fields to be searched upon, based upon the selection made by the user from a multilple select box. So, if it is 'OR' then the term(s) can be found in any one or more and I need to display the field in which the particular occurence in the Hits array was found. But, if  the 'AND' condition is used then it must be found in all. 

The MultiFieldQueryParser class does an 'OR' search. But, how to display the field in which the particular Hits' array item was found in case of 'OR' search
Regards,
Jitender