mysql - Multiple indexes in Solr -
i want index 2 tables mysql using apache solr. please see data-config , schema files below.
<dataconfig> <datasource type="jdbcdatasource" driver="com.mysql.jdbc.driver" url="jdbc:mysql://localhost:3306/test" user="root" password="root" batchsize="1" /> <document name="tb_location"> <entity name="tb_location" query="select * tb_location"> <field column="loc_code" name="id"/> <field column="loc_code" name="loc_code"/> <field column="loc_name" name="loc_name"/> <field column="loc_name" name="loc_name_ci"/> <field column="adm1_full_name" name="state"/> </entity> </document> <document name="person"> <entity name="person" query="select * person"> <field column="id" name="personid"/> <field column="fname" name="fname"/> <field column="lname" name="lname"/> <field column="town" name="town"/> </entity> </document> </dataconfig>
schema.xml
<field name="id" type="string" indexed="true" stored="true" required="true" multivalued="false" /> - <field name="loc_code" type="string" indexed="true" stored="true" required="true" multivalued="false" /> <field name="loc_name" type="string" indexed="true" stored="true" required="true" multivalued="false" /> <field name="loc_name_ci" type="string_ci" indexed="true" stored="true" required="true" multivalued="false" /> <field name="state" type="string" indexed="true" stored="true" required="true" multivalued="false" /> <field name="personid" type="string" indexed="true" stored="true" required="true" multivalued="false" /> <field name="fname" type="string" indexed="true" stored="true" required="true" multivalued="false" /> <field name="lname" type="string" indexed="true" stored="true" required="true" multivalued="false" /> <field name="town" type="string" indexed="true" stored="true" required="true" multivalued="false" />
also created unique id each tables (id , personid). when execute dataimport module, nothing fetched or indexed. can me figure out problem ?
please check below link multiple indexes...
Comments
Post a Comment