lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Using multiple analysers within a query
Date Mon, 22 Nov 2004 13:20:47 GMT
On Nov 22, 2004, at 2:56 AM, Morus Walter wrote:
> Kauler, Leto S writes:
>>
>> Would anyone have any suggestions on how this could be done?  I was
>> thinking maybe the QueryParser would have to be changed/extended to
>> accept a separator other than colon ":", something like "=" for 
>> example
>> to indicate this clause is not to be tokenised.
>
> I suggested that in a recent discussion and Erik Hatcher objected that
> it isn't a good idea, to require that users know which field to query
> in which way. I guess he is right.

QueryParser is a one-size fits (?) all sort of beast.  It has plenty of 
negatives, no question.

> If your query isn't entered by users, you shouldn't use query parser in
> most cases anyway.

I'd go even further and say in all cases.

>> Or perhaps this can all
>> be done using a single analyser?
>>
> Look at PerFieldAnalyzerWrapper.
> You will probably have to write a keyword analyzer (unless you can use
> whitespace analyzer in your case).

We should probably add a KeywordAnalyzer to Lucene's core at some point.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message