> 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.
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
--
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
I'm pretty sure your problem is
Query q = new BooleanQuery...
should be
BooleanQuery q = new BooleanQuery...
Best
Erick
[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
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
[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