[jira] [Commented] (SOLR-2834) SolrJ Field and Document Analyzes Response classes cannot parse CharFilter information

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SOLR-2834) SolrJ Field and Document Analyzes Response classes cannot parse CharFilter information

JIRA jira@apache.org

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

Eckhard jost commented on SOLR-2834:
------------------------------------

Doesn't fix it also the Issues: SOR-2767, SOLR-8177.

May they can be also closed?

> SolrJ Field and Document Analyzes Response classes cannot parse CharFilter information
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-2834
>                 URL: https://issues.apache.org/jira/browse/SOLR-2834
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java, Schema and Analysis
>    Affects Versions: 3.4, 3.6, 4.2, 7.4
>            Reporter: Shane
>            Assignee: Alexandre Rafalovitch
>            Priority: Major
>              Labels: patch
>             Fix For: 7.5
>
>         Attachments: AnalysisResponseBase.patch, SOLR-2834.patch, SOLR-2834.patch
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> When using FieldAnalysisRequest.java to analysis a field, a ClassCastExcpetion is thrown if the schema defines the filter org.apache.solr.analysis.HTMLStripCharFilter.  The exception is:
> java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
>        at org.apache.solr.client.solrj.response.AnalysisResponseBase.buildPhases(AnalysisResponseBase.java:69)
>        at org.apache.solr.client.solrj.response.FieldAnalysisResponse.setResponse(FieldAnalysisResponse.java:66)
>        at org.apache.solr.client.solrj.request.FieldAnalysisRequest.process(FieldAnalysisRequest.java:107)
> My schema definition is:
>     <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
>       <analyzer>
>         <charFilter class="solr.HTMLStripCharFilterFactory" />
>         <tokenizer class="solr.StandardTokenizerFactory" />
>         <filter class="solr.StandardFilterFactory" />
>         <filter class="solr.TrimFilterFactory" />
>         <filter class="solr.LowerCaseFilterFactory" />
>       </analyzer>
>     </fieldType>
> The response is part is:
>         <lst name="query">
>           <str name="org.apache.solr.analysis.HTMLStripCharFilter">testing analysis</str>
>           <arr name="org.apache.lucene.analysis.standard.StandardTokenizer">
>             <lst>...
> A simplistic fix would be to test if the Entry value is an instance of List.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]