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:
<dataConfig>
<dataSource name="jdbc" driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@myserver:1521:XE" user="MyUser"
password="MyPassword"/>
<document>
<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" />
</entity>
</document>
</dataConfig>
My schema.xml snippet:
<fields>
<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" />
</fields>
<uniqueKey>recordId</uniqueKey>
My expectation is that when the data is split and stored, that the document
would look something like this:
"docs": [
{
"relist": [
"PA21",
"MD29"
],
"recordId": "1",
"dbaName": [
"The Hong Kong Dragon",
"The Peeled Apple"
]
}
]
However, this is what I get:
"docs": [
{
"relist": [
"PA21",
"MD29",
"PA21|MD29"
],
"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.
Thanks
--
View this message in context:
http://lucene.472066.n3.nabble.com/Problem-using-splitBy-to-populate-a-multi-valued-field-tp4101770.html
Sent from the Solr - User mailing list archive at Nabble.com.