Solr DataImportHandler CachedSqlEntityProcessor ClassCastException

前端 未结 5 1666
[愿得一人]
[愿得一人] 2021-01-21 08:49

I am using Solr 4.6.0 and trying to import my data using CachedSqlEntityProcessor, but somehow I end up getting a ClassCastException.

5条回答
  •  猫巷女王i
    2021-01-21 09:17

    Solr CachedSqlEntityProcessor is depreciated somewhere around version 4.5. The new syntax uses cacheImpl, cacheKey & cacheLookup

    I had to update the SQL in my data-config.xml

    Old Syntax

    processor="CachedSqlEntityProcessor"
    where="fkId=parentTable.parentId"
    

    New Syntax

    cacheKey="fkId" cacheLookup="parenttable.parentId" cacheImpl="SortedMapBackedCache"
    

    See full latest Solr wiki info, the old DataImportHanlder page is out of date https://cwiki.apache.org/confluence/display/solr/Uploading+Structured+Data+Store+Data+with+the+Data+Import+Handler#UploadingStructuredDataStoreDatawiththeDataImportHandler-EntityProcessors

提交回复
热议问题