In your unit test, you have:

"<field column=\"type\" name=\"type\" splitBy=\"\\|\" />" +

And also:

runner.update("INSERT INTO test VALUES 1, 'foo,bar,baz'");

So you need to decide if you want to delimit with a pipe or a comma.

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: Christopher Condit [mailto:con...@sdsc.edu] 
Sent: Thursday, January 31, 2013 2:03 PM
To: solr-user@lucene.apache.org
Subject: DIH and splitBy

I'm having an issue getting the splitBy construct from the regex
transformer to work in a very basic case (with either Solr 3.6 or
4.1).

I have a field defined like this:
<field stored="true" name="type" type="string" multiValued="true"/>

The entity is defined like this:
<entity name="item" transformer="RegexTransformer" query="SELECT * FROM test">
  <field column="type" name="type" splitBy=","/>
</entity>

Here's a POM:
http://pastie.org/5992725

A JUnit test case showing the problem:
http://pastie.org/5993437

And a stackoverflow question with the same information:
http://stackoverflow.com/questions/14512055/splitting-database-column-into-multivalued-solr-field

Anyone have any ideas?

Thanks,
Chris

Reply via email to