1

Here is my table structure of data, and i want to index my data with solr So i am using solr6 DIH to index the data with mysql dataSource so how can i index the table data in following format.

   ---------------------------------------
   | id | name | en  | hi   | sp         |
   ---------------------------------------
   | 1  | test | test| परीक्षण | prueba     |
   ---------------------------------------
   | 2  | test1 | test1| परीक्षण1 | prueba1 |
   ---------------------------------------

   {
    id:1,
    name:test,
    trans{
      en:test,
      hi:परीक्षण,
      sp:prueba,
    }
  }
  {
   id:2,
   name:test1,
   trans{
    en:test1,
    hi:परीक्षण1,
    sp:prueba1,
   }
  }
  • It would probably be more useful to index the data flat, so you can easily use different analysis chains for each language (and it makes it easier to use when querying as well as feature support). Is there any particular reason why you want it as a child document? – MatsLindh Jun 22 '16 at 10:48
  • Yes because i am working on already build application and that is using data in this format. But now i have to use solr to fetch the data only. currently data is accessing from php file which gives data in above format. – Vikash Kumar Jun 22 '16 at 10:51
  • I strongly suggest transforming it on the way out or in your PHP client instead. – MatsLindh Jun 22 '16 at 10:55
  • Is there any way to get indexed document in this format. – Vikash Kumar Jun 22 '16 at 10:56

0 Answers0