0

I am indexing data from two tables(unrelated) mysql in solr 6.3 . Few fields from One of the tables is multivalued while rest are not. Now that when I run fullImport from solr admin panel, it indexes only single data for multivalued field. I have tried implementing regextransformer and splitby "," but didn't work. I have also tried using child entity but didn't work. Here is my data-config.xml and schema.xml.

Ajit Kumar
  • 41
  • 1
  • 7
  • The query is fetching the right number of data but indexing of field DESIGNATION and EXPERIENCE_SUMMARY is not done so when I search on it no result is returned. Also i see no exception in logger. – Ajit Kumar Dec 12 '16 at 13:25
  • In your code you are using transformer=TemplateTransformer, but you need RegexTransformer to use splitBy="," - so it should read ``. – James Doepp - pihentagyu Dec 12 '16 at 14:36
  • Thanks. It worked but I also had to change data-config where I replace sourceColName with name tag. – Ajit Kumar Dec 13 '16 at 06:40
  • I have one more question. Currently I have two entities in my data-config file. Is it possible to perform full import or delta import for one entity without affecting the other? – Ajit Kumar Dec 13 '16 at 06:48
  • I don't know how you would do it with DIH, but if you use a client API (see https://cwiki.apache.org/confluence/display/solr/Client+API+Lineup), you can update individual fields with the set modifier (see https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents) – James Doepp - pihentagyu Dec 13 '16 at 17:29
  • I'm adding my first comment as an answer, since that's really where it should be. – James Doepp - pihentagyu Dec 17 '16 at 15:04

1 Answers1

1

In your code you are using transformer=TemplateTransformer, but you need RegexTransformer to use splitBy="," - so it should read:

<entity name="Candidates" transformer="TemplateTransformer,RegexTransformer"...>