You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Brian Narsi <bn...@gmail.com> on 2015/12/04 22:09:56 UTC
Data Import Handler - Multivalued fields - splitBy
I have the following:
<field name="OrderNumbers" type="text" indexed="true" stored="true"
required="true" multiValued="true" />
I believe I had the following working (splitting on pipe delimited)
<field column="OrderNumbers" splitBy="\|" sourceColName="OrderNumbers" />
But it does not work now.
In-fact now I have even tried
<field column="OrderNumbers" splitBy="," sourceColName="OrderNumbers" />
But I cannot get the values to split into an array.
Any thoughts/suggestions what may be wrong?
Thanks,
Re: Data Import Handler - Multivalued fields - splitBy
Posted by saravanan1980 <sa...@nbcuni.com>.
It's resolved after changing my column name..its all case sensitive...
<field column="genre" sourceColName="genre" splitBy="\|" regex="^(.*)|$"
replaceWith=" " />
--
View this message in context: http://lucene.472066.n3.nabble.com/Data-Import-Handler-Multivalued-fields-splitBy-tp4243667p4260301.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Data Import Handler - Multivalued fields - splitBy
Posted by saravanan1980 <sa...@nbcuni.com>.
I am also having the same problem.
Have you resolved this issue?
"response": {
"numFound": 3,
"start": 0,
"docs": [
{
"genre": [
"Action|Adventure",
"Action",
"Adventure"
]
},
{
"genre": [
"Drama|Suspense",
"Drama",
"Suspense"
]
},
{
"genre": [
"Adventure|Family|Fantasy|Science Fiction",
"Adventure",
"Family",
"Fantasy",
"Science Fiction"
]
}
]
}
Please let me know, if it is resolved...
<document name="AllDoc">
<entity name="TitleEntity"
transformer="DateFormatTransformer,TemplateTransformer,RegexTransformer,LogTransformer"
pk="Sgenno"
query="EXEC ALL_SOLR_FullImport">
<field column="GENRE" sourceColName="genre" splitBy="\|" regex="^(.*)|$"
replaceWith=" " />
--
View this message in context: http://lucene.472066.n3.nabble.com/Data-Import-Handler-Multivalued-fields-splitBy-tp4243667p4260300.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Data Import Handler - Multivalued fields - splitBy
Posted by Brian Narsi <bn...@gmail.com>.
That was it! Thank you!
On Fri, Dec 4, 2015 at 3:13 PM, Dyer, James <Ja...@ingramcontent.com>
wrote:
> Brian,
>
> Be sure to have...
>
> transformer="RegexTransformer"
>
> ...in your <entity ...> tag. It’s the RegexTransformer class that looks
> for "splitBy".
>
> See https://wiki.apache.org/solr/DataImportHandler#RegexTransformer for
> more information.
>
> James Dyer
> Ingram Content Group
>
>
> -----Original Message-----
> From: Brian Narsi [mailto:bnarsi70@gmail.com]
> Sent: Friday, December 04, 2015 3:10 PM
> To: solr-user@lucene.apache.org
> Subject: Data Import Handler - Multivalued fields - splitBy
>
> I have the following:
>
> <field name="OrderNumbers" type="text" indexed="true" stored="true"
> required="true" multiValued="true" />
>
>
>
> I believe I had the following working (splitting on pipe delimited)
>
> <field column="OrderNumbers" splitBy="\|" sourceColName="OrderNumbers" />
>
> But it does not work now.
>
>
>
> In-fact now I have even tried
>
> <field column="OrderNumbers" splitBy="," sourceColName="OrderNumbers" />
>
> But I cannot get the values to split into an array.
>
> Any thoughts/suggestions what may be wrong?
>
> Thanks,
>
RE: Data Import Handler - Multivalued fields - splitBy
Posted by "Dyer, James" <Ja...@ingramcontent.com>.
Brian,
Be sure to have...
transformer="RegexTransformer"
...in your <entity ...> tag. It’s the RegexTransformer class that looks for "splitBy".
See https://wiki.apache.org/solr/DataImportHandler#RegexTransformer for more information.
James Dyer
Ingram Content Group
-----Original Message-----
From: Brian Narsi [mailto:bnarsi70@gmail.com]
Sent: Friday, December 04, 2015 3:10 PM
To: solr-user@lucene.apache.org
Subject: Data Import Handler - Multivalued fields - splitBy
I have the following:
<field name="OrderNumbers" type="text" indexed="true" stored="true"
required="true" multiValued="true" />
I believe I had the following working (splitting on pipe delimited)
<field column="OrderNumbers" splitBy="\|" sourceColName="OrderNumbers" />
But it does not work now.
In-fact now I have even tried
<field column="OrderNumbers" splitBy="," sourceColName="OrderNumbers" />
But I cannot get the values to split into an array.
Any thoughts/suggestions what may be wrong?
Thanks,