[hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-443) Using a Field extending AbstractField causes a ClassCastException in DocumentBuilderIndexedEntity when using @AnalyzerDiscriminator

Markus Horehled (JIRA) noreply at atlassian.com
Thu Jan 14 09:07:35 EST 2010


Using a Field extending AbstractField causes a ClassCastException in DocumentBuilderIndexedEntity when using @AnalyzerDiscriminator 
------------------------------------------------------------------------------------------------------------------------------------

                 Key: HSEARCH-443
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-443
             Project: Hibernate Search
          Issue Type: Bug
          Components: engine
    Affects Versions: 3.2.0.Beta1
            Reporter: Markus Horehled


I use a @AnalyzerDiscriminator in order to return the name of an existing analyzer depending on the language out of my Analzyers defined in @AnalyzerDefs. Further on I use a custom Field extending AbstractField/implementing org.apache.lucene.document.Fieldable within a custom FieldBridge. On building the corresponding index I then do get a ClassCastException from ocumentBuilderIndexedEntity's allowAnalyzerDiscriminatorOverride() method because this method casts the document's fields retrieved with doc.getFields() to Field instead of Fieldable even though Fieldable interface implementing objects are only added to that list in Document! Thus Fieldable interface should rather be used here instead of Field.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list