On Mar 16, 2006, at 5:10 AM, Waleed Tayea wrote:
I'm using the QueryParser to parse and return a query of a search
string
of a single word. But the analyzer I uses emits another morphological
tokens from that single word. How can I prevent the QueryParser of
considering the search query as a PhraseQuery with the terms of that
single word search string and the other morphological tokens. I just
want to make it return a BooleanQuery with Boolean clauses of all
tokens, each one with its own as a TermQuery.
You will need to override this behavior by subclassing QueryParser
and overriding getFieldQuery to create the BooleanQuery yourself.
If the tokens are emitted in the same position (increment of 0) and
you're using Lucene 1.9.x it will work differently in this case than
1.4.3 did - positions were not taken into account in 1.4.3, but are
in the latest version.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]