SolrEntityProcessor is called only once for sub-entities

穿精又带淫゛_ 提交于 2019-12-17 21:11:37

问题


I'm using Solr 4.2, and I am trying to call SolrEntityProcessor as a sub-entity. So far, only one call is made to Solr and a single document is indexed while all others are ignored. This should be possible, but it doesn't seem to work... Any ideas?

Code snippist:

<document>
  <entity dataSource="psql" name="user" query="SELECT * FROM users";>
    <field column="id" name="user_id" />

    <entity name="liked_items" processor="SolrEntityProcessor" url="http://localhost:8983/solr/items" query="user_liking_this:${user.id}" rows="1000" fl="item_id" >
      <field column="item_id" name="item_id" />
    </entity>

  </entity>
</document>

回答1:


I've just found my answer in this Solr JIRA issue. Tested and working as expected!

The solution is to use the patched SolrEntityProcessor attached to the issue instead of the one included in the DataImportHandler JAR.

Note that you will need it for any Solr version up to and including 4.3.0 (and possibly higher) - despite what the issue status and comments say, the patch does not appear to be included in any existing version.



来源:https://stackoverflow.com/questions/15734308/solrentityprocessor-is-called-only-once-for-sub-entities

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!