Im trying to index MySql database using Data Import Handler in solr. I have made two tables. The first table holds the metadata of a file.
create table filemetadata ( id varchar(20) primary key , filename varchar(50), path varchar(200), size varchar(10), author varchar(50) ) ; The second table contains the "favourite" info about a particular file in the above table. create table filefav ( fid varchar(20) primary key , id varchar(20), favouritedby varchar(300), favouritedtime varchar(10), FOREIGN KEY (id) REFERENCES filemetadata(id) ) ; As you can see "id" is a foreign key. To index this i have written the following data-config.xml - <dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/test" user="root" password="root" /> <document name="filemetadata"> <entity name="restaurant" query="select * from filemetadata"> <field column="id" name="id" /> <entity name="filefav" query="select favouritedby from filefav where id= '${filemetadata.id}'"> <field column="favouritedby" name="favouritedby1" /> </entity> <field column="filename" name="name1" /> <field column="path" name="path1" /> <field column="size" name="size1" /> <field column="author" name="author1" /> </entity> </document> </dataConfig> Everything is working but the "favouritedby1" field is not getting indexed , ie, that field does not exist when i run the *:* query. Can you please help me out? -- View this message in context: http://lucene.472066.n3.nabble.com/Indexing-database-in-Solr-using-Data-Import-Handler-tp4077180.html Sent from the Solr - User mailing list archive at Nabble.com.