Hallo Erik and Daan,
thank you for the help. MultFieldQueryParser is described in chapter 5,
I was searching in chapter 3. Sorry.
Greetings and best wishes for the New Year 2006!
Gaston
Daan de Wit schrieb:
Hi Gaston,
Have a look at MultiFieldQueryParser.
Greetings,
Daan
-----Original Message-----
From: Gaston [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 29, 2005 13:42
To: java-user@lucene.apache.org
Subject: QueryParser over multiple fields
Hallo,
in my index every document consistsof multiple fields like
url,contents,description etc.I want to search for documents in the url
and the contents field.
My problem is that the constructor of QueryParser only provide one field
like "Query query=QueryParser.parse("query",field1,analyzer);"
Is there an oppurtinity to construct an query Object like "Query
query=QueryParser.parse("query",field1,field2,analyzer);" to provide a
search over field1 and field2 ?
I solved this problem in a very unelegant way I think because I
introduced two searching procedures in my application, one for field1
and the another one for field2. But this is very bad for the performance
because the application has to search two times.
I am glad about every suggestion
Greetings
Gaston
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]