lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lash20 <>
Subject Problem using splitBy to populate a multi valued field
Date Mon, 18 Nov 2013 18:51:36 GMT
Hi there,

I'm having trouble using the splitBy functionality to populate a multi
valued field from a pipe delimited datasource. My implementation seems to
partially work for one of the field and does not the work for the the other
field. An example of my implementation below.

I have a db view with following data:
recordId      relist                  dbaName
1                PA21|MD29         The Hong Kong Dragon|The Peeled Apple

My config:
    <dataSource name="jdbc" driver="oracle.jdbc.driver.OracleDriver" 
	url="jdbc:oracle:thin:@myserver:1521:XE" user="MyUser"
        <entity name="mentity" query="select * from MySampleView"
transformer="RegexTransformer" >

			<field sourceColName="relist" column="relist" splitBy="\|"  />		
			<field sourceColName="dbaName" column="dbaName" splitBy="\|"  />
                        <field column="recordId" name="recordId" />

My schema.xml snippet:

  <field name="relist"      type="string"    indexed="true"  stored="true" 
multiValued="true" /> 
  <field name="dbaName"      type="string"    indexed="true"  stored="true" 
multiValued="true" />
  <field name="recordId"        type="string"    indexed="true" 
stored="true"  multiValued="false" />


My expectation is that when the data is split and stored, that the document
would look something like this:

 "docs": [
        "relist": [
        "recordId": "1",
        "dbaName": [
          "The Hong Kong Dragon",
	  "The Peeled Apple"

However, this is what I get:
 "docs": [
        "relist": [
        "recordId": "1",
        "dbaName": [
          "The Hong Kong Dragon|The Peeled Apple"

My issue:
1) relist is being split but it also includes the original delimited value
in the list
2) dbaName is not being split at all

Any help would be appreciated.


View this message in context:
Sent from the Solr - User mailing list archive at

View raw message