lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shane (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-2834) AnalysisResponseBase.java doesn't handle org.apache.solr.analysis.HTMLStripCharFilter
Date Tue, 08 May 2012 14:37:49 GMT

     [ https://issues.apache.org/jira/browse/SOLR-2834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shane updated SOLR-2834:
------------------------

    Attachment: AnalysisResponseBase.patch

Patch file for fix to check if the Entry value is an instance of List.
                
> AnalysisResponseBase.java doesn't handle org.apache.solr.analysis.HTMLStripCharFilter
> -------------------------------------------------------------------------------------
>
>                 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
>            Reporter: Shane
>         Attachments: AnalysisResponseBase.patch
>
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message