(10/11/11 1:57), bbarani wrote:
Hi, I have a peculiar situation where we are trying to use SOLR for indexing multiple tables (There is no relation between these tables). We are trying to use the SOLR index instead of using the source tables and hence we are trying to create the SOLR index as that of source tables. There are 3 tables which needs to be indexed. Table 1, table 2 and table 3. I am trying to index each table in seperate doc tag with different doc tag name and each table has some of the common field names. For Ex: <document name="DataStoreElement"> <entity name="DataStoreElement" query=""> <field column="DATA_STOR" name="DATA_STO"/> </entity> </document> <document name="DataStore"> <entity name="DataStore" query=""> <field column="DATA_STOR" name="DATA_STO"/> </entity> </document>
Barani, You cannot have multiple documents in a data-config, but you can have multiple entities in a document. And if your table 1,2, and 3 come from different dataSources, you can have multiple data sources in a data-config. If so, you should use dataSource attribute of entity element to refer to the name of dataSource: <dataConfig> <dataSource name="ds1" .../> <dataSource name="ds2" .../> <dataSource name="ds3" .../> <document> <entity name="t1" dataSource="d1" query="SELECT * from t1 ..." .../> <entity name="t2" dataSource="d2" query="SELECT * from t2 ..." .../> <entity name="t3" dataSource="d3" query="SELECT * from t3 ..." .../> </document> </dataConfig> Koji -- http://www.rondhuit.com/en/