2 different tables no relation
data-config.xml:
<document>
<entity name="topic" transformer="TemplateTransformer" pk="topic_id" query="select topic_id,topic_title,creation_date,updation_date,vote_count,.....">
<field column=" doc_id " template="TOPIC_${topic.topic_id} " />
<field column="doc_type " template="TOPIC " />
</entity>
<entity name="product " transformer="TemplateTransformer " pk="product_id " query="SELECT product_id,..... ">
<field column="doc_id " template="PRODUCT_${product.product_id} " />
<field column="doc_type " template="PRODUCT " />
<field column="product_supplier_id " name="product_supplier_id " />
<field column="supplier_product_code " name="supplier_product_code " />
<field column="product_display_name " name="product_display_name " />
</entity>
</document>
schema.xml:
<schema>
. . .
<fields>
<field name="doc_id" type="string" />
<field name="doc_type" type="string" />
<field name="catchall" type="string" stored="false" omitNorms="true" multiValued="true" />
<field name="topic_title" type="text_general" />. . . .
</fields>
<uniqueKey>doc_id</uniqueKey>
<copyField source="*" dest="catchall" />
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
<defaultSearchField>catchall</defaultSearchField>
</schema>
more info -http://www.lucidimagination.com/blog/2011/02/12/solr-powered-isfdb-part-4/
no above field should be required or may create problem while indexing
you can query on browser like http://localhost:8080/solr/select/?q=*:*&fq=doc_type:PRODUCT