Re: Multifield query parser

2010-12-18 Thread Ahmet Arslan
> While searching across multiple fields using > MultiFieldQueryParser, when a > doc is returned how do I know in this doc which field(among > the multiple > fields i queried over) contained the query term? You can extract that info from org.apache.lucene.search.Explanation. http://lucene.apache.

Re: MultiField Query

2006-07-17 Thread Michael D. Curtin
Erick Erickson wrote: I'm pretty sure your problem is Query q = new BooleanQuery... should be BooleanQuery q = new BooleanQuery... Good catch! That's why the add() method is barfing. The parse() thing, though, is probably a change to the QueryParser interface for 2.0. --MDC --

Re: MultiField Query

2006-07-17 Thread Erick Erickson
P.S. Are you sure you're looking at the 2.0 docs? I don't see any Query.parse(String, String, Analyzer) in the 2.0 docs. Rather, I see QueryParser(String field, Analyzer analyzer) and a non-static method parse(String parse). Best Erick

Re: MultiField Query

2006-07-17 Thread Erick Erickson
I'm pretty sure your problem is Query q = new BooleanQuery... should be BooleanQuery q = new BooleanQuery... Best Erick

Re: MultiField Query

2006-07-17 Thread Michael D. Curtin
[EMAIL PROTECTED] wrote: When I try this ( using Lucene 2.0 API ) I get the error: "..The method parse(String) is not applicable for arguments (String, String, StopAnalyzer) ... When I try this I get the error: The method add(TermQuery, BooleanClause.Occur) is undefined for type Query Could th

RE: MultiField Query

2006-07-16 Thread Rod.Madden
Could this be a 2.0 issue ? Rod -Original Message- From: Michael D. Curtin [mailto:[EMAIL PROTECTED] Sent: Sunday, July 16, 2006 8:04 PM To: java-user@lucene.apache.org Subject: Re: MultiField Query [EMAIL PROTECTED] wrote: > I am using Lucene 2.0 and trying to use the MultiFieldQueryPa

Re: MultiField Query

2006-07-16 Thread Michael D. Curtin
[EMAIL PROTECTED] wrote: I am using Lucene 2.0 and trying to use the MultiFieldQueryParser in my search. I want to limit my search to documents which have "silly" in "field1" ...within that subset of documents, I want documents which have "example" in "field2" OR "field3" The code fragment b