How to index and search two different tables which are in same datasource using single solr instance Or Solr Template fields not working properly

后端 未结 2 1237
孤街浪徒
孤街浪徒 2020-12-19 05:24

I want to index and search two different entity.

File name: db-data-config.xml


    

        
相关标签:
2条回答
  • 2020-12-19 05:38

    Have you tried indexing your entities individually from admin screen

    http://<hostname>:<portnum>/solr
    
    0 讨论(0)
  • 2020-12-19 05:56

    All of the fields in your schema have

    required="true".
    

    You're telling Solr that the results from each entity need to have ALL of the eid, ename, pid, pname, entity, and singlekey fields.

    Employee doesn't have a pid or pname field, so pid and pname shouldn't be required. In the same sense, Product doesn't have a eid or ename field, so eid and ename shouldn't be required.

    Removing

    required="true".
    

    from pid, pname, eid, and ename will allow you to index.

    0 讨论(0)
提交回复
热议问题