>Please try using the MultiFieldQueryParser's constructor, not the static
>>method. I think that might fix your problem.
Yes, after I created a new MultiFieldQueryParser and calling the parse( String
query) method my search executed as expected.
Thanks for your help!
Scott
>> BooleanClause.Occur[]{BooleanClause.Occur.SHOULD,
>> BooleanClause.Occur.SHOULD}
>Why do you explicitly specify these operators?
I am using the parse(String query, String[] fields, BooleanClause.Occur[]
flags, Analyzer analyzer) method as opposed to parse(String[] queries, String[]
fields, Analyzer analyzer). They seem to have the same result.
>> q.add(keywordQuery, BooleanClause.Occur.MUST);
>You seem to wrap a query in another BooleanQuery. As long as keywordQuery
>is the only query that doesn't seem to make sense.
I am adding additional Query objects later on in my code.
-----Original Message-----
From: Daniel Naber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 19, 2006 4:06 PM
To: [email protected]
Subject: Re: MultiFieldQueryParser doesn't properly filter out documents when
the query string specifies to exclude certain terms
On Tuesday 19 December 2006 23:05, Scott Sellman wrote:
> new
> BooleanClause.Occur[]{BooleanClause.Occur.SHOULD,
> BooleanClause.Occur.SHOULD}
Why do you explicitly specify these operators?
> q.add(keywordQuery, BooleanClause.Occur.MUST);
You seem to wrap a query in another BooleanQuery. As long as keywordQuery
is the only query that doesn't seem to make sense. Please try using the
MultiFieldQueryParser's constructor, not the static method. I think that
might fix your problem.
Regards
Daniel
--
http://www.danielnaber.de
---------------------------------------------------------------------
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]