Wolf Siberski wrote:
Kevin A. Burton wrote:
Yet another patch.
Right now there are a number of DEFAULT_ vars in IndexWriter. On init these are fetched from system properties and initialized.
One problem here though is that once the VM has been started there's no way to chnage them. I'd prefer to set these via my own initializer as we use a reflection system to set system properies and this will tie into our system much better. It would also allow someone to write their own initializer to just set org.apache.lucene.index.IndexWriter.DEFAULT_MERGE_FACTOR = .... or do this dynamically via code. (not everyone has access to system properties)
I see following issues with your patch:
- you changed the DEFAULT_... semantics from constant to modifiable,
but didn't adjust the names according to Java conventions (default_...).
Java doesn't have any naming conventions which include an underscore.
I assume you mean defautUse ...
Also... I hold these naming conventions suspect. :) I'll note why when I respond to doug's/erik's email...
- it seems even you don't need to have them non-constant, you just want to fetch the default values from another source. This is an indication that your approach isn't really the appropriate solution to your problem.
Push and pull... I want my code to change the value at any arbitrary time...
- you can achieve the same by writing your own IndexWriterFactory which sets the corresponding values after creating a new IndexWriter. Should be ~30 lines of code. It only makes sense to include a patch if either a solution is impossible with the current code or *a lot* of (potential) users have to work around something.
I *could* (and I thought of it) but it seems reasonable to be able to set Lucene to use whatever settings you
want at anytime...
Kevin
--
Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat.
Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html
If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod!
Kevin A. Burton, Location - San Francisco, CA
AIM/YIM - sfburtonator, Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]