lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4877) Fix analyzer factories to throw exception when arguments are invalid
Date Mon, 01 Apr 2013 15:53:16 GMT


Robert Muir commented on LUCENE-4877:

I have no preference on how to proceed. I just dont want to download such a large patch, modify
the sources and upload it again. especially as TortoiseSVN and other clients depend on order
of files in filesystem, the order of created patches is different, too. So its impossible
to see any change in comparison to earlier patches.

As we don't intend to release trunk soon: If all tests pass, can you simply commit as a first
step, Robert? +1 on the current patch.

Ok. I'll commit this one to trunk. We can merge back to stable when we are happy.

We can open further issues to unfuck ResourceLoaderAware (it should be removed, too and the
ResourceLoader should be passed to the ctor, too).

I don't like this either: but it would require more heavy duty stuff in solr to fix that.
I also think it would be good to separate that from the goal of throwing exceptions for bogus
arguments (as i fixed that for all analysis factories in this patch despite the ResourceLoader
issue: all arguments are parsed in ctor and the inform() only does actual loading).

The challenge in fixing the ResourceLoader stuff is in SolrResourceLoader. when it loads these
"aware" classes it only adds them to a list (it defers this), and then at the end calls inform()
on everything in the list. I haven't looked into why this is, but yeah i would definitely
prefer if this was a followup issue actually.

I would like this change (throw exception on invalid arguments) to make it back to the stable
branch, so I'll keep this issue open until everyone is happy with it. But in general we should
try to split up issues for these factories into steps: its not easy to make these sweeping
changes unless you either have lots of time or are ok with introducing bugs.

> Fix analyzer factories to throw exception when arguments are invalid
> --------------------------------------------------------------------
>                 Key: LUCENE-4877
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: Robert Muir
>         Attachments: LUCENE-4877_one_solution_prototype.patch, LUCENE-4877.patch, LUCENE-4877.patch,
> Currently if someone typos an argument "someParamater=xyz" instead of someParameter=xyz,
they get no exception and sometimes incorrect behavior.
> It would be way better if these factories threw exception on unknown params, e.g. they
removed the args they used and checked they were empty at the end.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message