As I've stated in my earlier mail, I like this change. More importantly, 
could this become a "standard" way of changing configurations at runtime? 
For example, the default merge factor could also be set in this manner.

sv

On Wed, 3 Mar 2004, Michael Duval wrote:

> 
> I agree with both the property name change and also making it static.
> 
> Mike
> 
> Doug Cutting wrote:
> 
> > Michael Duval wrote:
> >  > I've hacked the code for the time being by updating FSDirectory and
> >
> >> replaced all System.getProperty("java.io.tmpdir")
> >> calls with a call to a new method "getLockDir()".   This method 
> >> checks for a "lucene.lockdir" prop before the
> >> "java.io.tmpdir" prop giving the end user a bit more flexibility in 
> >> where locks are stored.
> >
> >
> > In general, I support this change.
> >
> >> Here is the method:
> >>
> >>  /** Allow flexible locking directories - Michael R. Duval 3/02/04 */
> >>  private String getLockDir() {
> >>        String lockDir;
> >>
> >>        if ((lockDir = System.getProperty("lucene.lockdir")) == null)
> >>                return System.getProperty("java.io.tmpdir");
> >>        else
> >>                return  lockDir;
> >>  }
> >
> >
> > In particular, I have some quibbles.  The property should be named 
> > something like "org.apache.lucene.lockdir", not just "lucene.lockdir". 
> > And there's no reason to look it up each time: it can just be a static.
> >
> > private static final String LOCK_DIR =
> >   System.getProperty("org.apache.lucene.lockdir",
> >                      System.getProperty("java.io.tmpdir"));
> >
> > Doug
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to