lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Lucene's default settings & back compatibility
Date Wed, 20 May 2009 16:14:05 GMT
On Wed, May 20, 2009 at 11:57 AM, Yonik Seeley
<yonik@lucidimagination.com> wrote:
> On Wed, May 20, 2009 at 11:46 AM, Mark Miller <markrmiller@gmail.com> wrote:
>> Marvin Humphrey wrote:
>>>
>>> Yeesh, that's evil.  :(
>>>
>>> It will be sweet, sweet justice if one of your own projects gets infected
>>> by
>>> the kind of action-at-a-distance bug you're so blithely unconcerned about
>>
>> Heh. Thats a bit over the top. It is evil stuff, but its much less evil in
>> this very contained instance than the general case. Much less.
>>
>> But still a bit evil with the potential to grow. I'm not anymore of a fan of
>> passing a config to each class though. But I guess from a design point
>> of view, it does feel a little less evil.
>
> Agree.
>
> But passing settings around doesn't solve the problem.  Example:  New
> settings may be chosen by an application for an IndexSearcher that's
> incompatible with a custom older Query/Weight/Scorer.  There's really
> no getting around that problem.  I think the static helps solve
> drop-in compat for a complete working application.  Good components
> should only be checking the static, not setting it.

Also, this static setting simply tells Lucene how to default settings.

A component/app can still be explicit when creating classes.  EG when
opening an IndexReader, if one always passes in the readOnly arg then
the static "actsAsVersion" would not be used.

Mike

---------------------------------------------------------------------
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