lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DM Smith <dmsmith...@gmail.com>
Subject Re: Lucene's default settings & back compatibility
Date Tue, 19 May 2009 10:56:37 GMT

On May 19, 2009, at 6:39 AM, Michael McCandless wrote:

> On Mon, May 18, 2009 at 8:51 PM, Yonik Seeley
> <yonik@lucidimagination.com> wrote:
>> On Mon, May 18, 2009 at 5:06 PM, Michael McCandless
>> <lucene@mikemccandless.com> wrote:
>>> * StopFilter should enable position increments by default
>>
>> Is this one an actual improvement in the general case?
>> A query of "foo bar" then wouldn't match a document with "foo and
>> bar", but a query of "foo the bar" would.
>
> Well... I think I'd argue that this is an improvement, ie the query
> "foo bar" should not in fact match a doc with "foo and bar" (unless
> your PhraseQuery is using slop).  If you really want slop in your
> matching, you should just use slop.
>
> Query "foo the bar" will match document "foo and bar" in either case,
> so it's non-differentiating here.
>
> Also, it's bothersome that by default StopFilter throws away more
> information than it needs to.  Ie, it's already discarding words
> (that's its purpose) but the fact that it then also discards the holes
> left behind, by default, is not good, I think.
>
> I went and re-read http://issues.apache.org/jira/browse/LUCENE-1095.
> Since both QueryParser and StopFilter can now preserve position
> increments, I'd think we would want to change both to do so (in the
> *Settings classes)?
>
> (And, QueryParser is another great example where a *Settings class
> would give us much more freedom to fix its quirks w/o breaking back
> compat.)
>
> Anyway, this is a great debate, in that any defaults set in Lucene
> over time should be scrutinized, through discussions like this, rather
> than simply always forcefully left on their back-compat defaults.  The
> Settings class would give us this freedom.

I really like the idea of a settings class. Another benefit,  
*especially if it is documented well*, user's would be led to tuning  
parameters.

In this settings class, would there be setters/getters so that one  
could take particular defaults and tweak them? E.g. I like one default  
from 2.4 but will take everything else from 3.0. Therefore, I use the  
3.0 defaults, but change one of the settings to match 2.4, as in:

LuceneSettings myDefaults = LuceneSettings.defaults3_0();
myDefaults.setXXX(LuceneSettings.defaults2_4().getXXX());
LuceneSettings.useDefaults(myDefaults);


-- DM


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


Mime
View raw message