Mailing List Archive

IndexWriter and system properties
Hi,

there's a bug report (#34359) asking to catch and ignore access exceptions
when reading system properties so Lucene can be used in an applet. I
wanted to apply that patch, but now I'm not sure anymore: does it make
sense for Lucene to read settings from system properties? Shouldn't that
be left to the application that uses Lucene? There are set... calls for
most of these settings, so it's trivial to implement this for a user of
Lucene.

Regards
Daniel

--
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: IndexWriter and system properties [ In reply to ]
On Jul 11, 2005, at 5:56 PM, Daniel Naber wrote:
> there's a bug report (#34359) asking to catch and ignore access
> exceptions
> when reading system properties so Lucene can be used in an applet. I
> wanted to apply that patch, but now I'm not sure anymore: does it make
> sense for Lucene to read settings from system properties? Shouldn't
> that
> be left to the application that uses Lucene? There are set... calls
> for
> most of these settings, so it's trivial to implement this for a
> user of
> Lucene.

The reading of system properties has been a "problem" with Lucene.
It can be problematic where different settings are needed within the
same JVM as well as the applet (and certainly also WebStart)
deployments you mention.

I'm all for pulling out the internal use of system properties,
leaving the defaults as-is.

Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: IndexWriter and system properties [ In reply to ]
From the perspective of a user of Lucene:
IMHO, having system properties for a third-party library is not good:
1) System properties are not explicit in the library's api.
2) System properties are applied non-local to the use of a library's api.
3) System properties represents global variables, not local control.
4) System properties may or may not be cached. If cached, this may be
early enough to make it hard to set it after application startup.
5) System properties force an application to have additional mechanisms
for startup.
6) System properties are seldom documented well.
...

Daniel Naber wrote:

>Hi,
>
>there's a bug report (#34359) asking to catch and ignore access exceptions
>when reading system properties so Lucene can be used in an applet. I
>wanted to apply that patch, but now I'm not sure anymore: does it make
>sense for Lucene to read settings from system properties? Shouldn't that
>be left to the application that uses Lucene? There are set... calls for
>most of these settings, so it's trivial to implement this for a user of
>Lucene.
>
>Regards
> Daniel
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: IndexWriter and system properties [ In reply to ]
I remember adding some of those, and I don't really recall why I was
adding them. I think we just didn't have various setters we have now,
and for some reason chose not to add them. Now that we have (most of
them?), I think system properties can go.

Otis


--- Daniel Naber <lucenelist@danielnaber.de> wrote:

> Hi,
>
> there's a bug report (#34359) asking to catch and ignore access
> exceptions
> when reading system properties so Lucene can be used in an applet. I
> wanted to apply that patch, but now I'm not sure anymore: does it
> make
> sense for Lucene to read settings from system properties? Shouldn't
> that
> be left to the application that uses Lucene? There are set... calls
> for
> most of these settings, so it's trivial to implement this for a user
> of
> Lucene.
>
> Regards
> Daniel
>
> --
> http://www.danielnaber.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: IndexWriter and system properties [ In reply to ]
On Tuesday 12 July 2005 16:42, Otis Gospodnetic wrote:

> I remember adding some of those, and I don't really recall why I was
> adding them.  I think we just didn't have various setters we have now,
> and for some reason chose not to add them.  Now that we have (most of
> them?), I think system properties can go.

Okay, I have started to remove them. I'll touch other files the next days
and do the same there. If people miss some of the setters (e.g. setting
the lock timeout -- does anybody actually use that?), they'll complain
soon enough.

Regards
Daniel

--
http://www.danielnaber.de

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