You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by qaz zaq <fo...@yahoo.com> on 2007/08/03 21:41:48 UTC

multiple field searcher

I have Search Terms: T1, T2... Tn. Also I have document fields of F1 F2... Fm.

I want to search the match documents across F1 to Fm fields,i.e., all of the T1, T2, ...Tn need to be matched, but can be in the combination of T1, T2, ... Tn field. 

I check the MultiFieldQueryParser, it doesn't appear to support this. How can I do that?  Thanks

       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 

Re: multiple field searcher

Posted by Steven Rowe <sa...@syr.edu>.
qaz zaq wrote:
> I have Search Terms: T1, T2... Tn. Also I have document fields of F1 F2... Fm.
> 
> I want to search the match documents across F1 to Fm fields,i.e., all of the T1, T2, ...Tn need to be matched, but can be in the combination of T1, T2, ... Tn field. 
> 
> I check the MultiFieldQueryParser, it doesn't appear to support this. How can I do that?  Thanks

You could make an aggregate field that contains all of the terms from
fields F1..Fm, and then search exclusively against it, requiring each
term to appear.

The alternative, in which you automate spelling out all of the
combinations, won't scale to a large field set or to a large term set.
But if you can guarantee that both are small (cardinality <= 3, maybe?),
then it might be feasible.

Steve

-- 
Steve Rowe
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp

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