You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Daniel Naber <da...@t-online.de> on 2004/03/25 20:57:54 UTC
German stopword loading fails silently
Hi,
I noticed that GermanAnalyzer fails silently if the stopword file is not
found:
GermanAnalyzer ga = new GermanAnalyzer(new File("/notfound"));
In this case an empty stopword list is used without any warning. I consider
silent failure a bug. It's easy to fix, but is it okay to add "throws
IOException" or do you consider that an incompatible change? If you think
it's okay I'll submit a bug report + patch.
The only other solution I can think of would be to print a warning via
System.out.println(), but that's not how it's supposed to be done,
obviously.
Regards
Daniel
--
http://www.danielnaber.de
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
Re: German stopword loading fails silently
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
I think a failure for files not found is appropriate.
Erik
On Mar 25, 2004, at 2:57 PM, Daniel Naber wrote:
> Hi,
>
> I noticed that GermanAnalyzer fails silently if the stopword file is
> not
> found:
>
> GermanAnalyzer ga = new GermanAnalyzer(new File("/notfound"));
>
> In this case an empty stopword list is used without any warning. I
> consider
> silent failure a bug. It's easy to fix, but is it okay to add "throws
> IOException" or do you consider that an incompatible change? If you
> think
> it's okay I'll submit a bug report + patch.
>
> The only other solution I can think of would be to print a warning via
> System.out.println(), but that's not how it's supposed to be done,
> obviously.
>
> Regards
> Daniel
>
> --
> http://www.danielnaber.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org