lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Braun (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-10386) Analysis page breaks on anonymous inner class TokenFilter name
Date Wed, 29 Mar 2017 16:12:41 GMT

    [ https://issues.apache.org/jira/browse/SOLR-10386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15947413#comment-15947413
] 

Michael Braun commented on SOLR-10386:
--------------------------------------

[~arafalov] I'm not sure if any Solr-provided TokenFilters are implemented just as an anonymous
class. The tokenfilterfactory question looked something like this:

{code}
public class AnalysisTestFilterFactory extends TokenFilterFactory {

    public AnalysisTestFilterFactory(Map<String, String> args) {
        super(args);
    }

    @Override
    public TokenStream create(TokenStream input) {
        return new TokenStream(input) {
            @Override
            public boolean incrementToken() throws IOException {
                return input.incrementToken();
            }
        };
    }
}
{code}

> Analysis page breaks on anonymous inner class TokenFilter name
> --------------------------------------------------------------
>
>                 Key: SOLR-10386
>                 URL: https://issues.apache.org/jira/browse/SOLR-10386
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Admin UI
>    Affects Versions: 6.2.1
>            Reporter: Michael Braun
>            Priority: Minor
>
> analysis.js has a function getShortComponentName which attempts to find the short name
given a full class name. However, this does not work and gets a null internally when the class
looks something like this, as in an anonymous inner class:
> com.company.solr.stuff.MyTokenFilterFactory$1
> {code}
> TypeError: Cannot read property 'join' of null
>   at getShortComponentName (analysis.js:50)
>   at extractComponents (analysis.js:96)
>   at processAnalysisData (analysis.js:109)
>   at analysis.js:172
>   at angular-resource.min.js:33
>   at processQueue (angular.js:13193)
>   at angular.js: 13209
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message