lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dodsworth (Commented) (JIRA)" <>
Subject [jira] [Commented] (SOLR-3017) Allow edismax stopword filter factory implementation to be specified
Date Wed, 01 Feb 2012 03:02:59 GMT


Michael Dodsworth commented on SOLR-3017:

Thanks for the review, Erick. Much appreciated.

1 - I'll create an alternative patch with the guava stuff switched out for StringUtils. I'm
personally a big fan of the guava lib but I'm not using it for anything too useful here.

2 - I've actually provided ExtendedSolrQueryParser with a default value (around ExtendedDismaxQParserPlugin:851)
for 'stopwordFilterFactoryClass'. It's possible that someone could call 'setStopwordFilterFactoryClass'
with null, in which case we would have a NPE. I've no problem adding a defensive null check
before the 'isInstance' call. The other option would be to add a @NonNull annotation to that
argument...but I'm not sure if findbugs or similar is run as part of the solr build process.

> Allow edismax stopword filter factory implementation to be specified
> --------------------------------------------------------------------
>                 Key: SOLR-3017
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>         Attachments: SOLR-3017.patch, edismax_stop_filter_factory.patch
> Currently, the edismax query parser assumes that stopword filtering is being done by
StopFilter: the removal of the stop filter is performed by looking for an instance of 'StopFilterFactory'
(hard-coded) within the associated field's analysis chain.
> We'd like to be able to use our own stop filters whilst keeping the edismax stopword
removal goodness. The supplied patch allows the stopword filter factory class to be supplied
as a param, "stopwordFilterClassName". If no value is given, the default (StopFilterFactory)
is used.
> Another option I looked into was to extend StopFilterFactory to create our own filter.
Unfortunately, StopFilterFactory's 'create' method returns StopFilter, not TokenStream. StopFilter
is also final.

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


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

View raw message