Can you do after DIH in the UpdateRequestProcessor chain? Might be
cleaner than trying to hack the multi-path processing in DIH.

Regards,
   Alex.
----
Sign up for my Solr resources newsletter at http://www.solr-start.com/


On 10 February 2015 at 04:29, Pankaj Sonawane <pankaj4sonaw...@gmail.com> wrote:
> Hi,
>
> I am using Solr DataImportHandler to index data from database
> table(Oracle). One of the column contains String of ='s and ','s (Please
> column3 in example below)
> Like
> Column1 = "F"
> Column2 = "ASDF"
> *Column3 = "A=1,B=2,C=3,D=4..............Z=26"*
>
> I want solr to index each 'alphabet'  against its value
>
> *expected*. JSON for 1 row
> "docs": [ {
> "COL1": "F",
> "COL2": "ASDF", "A_s": "1", "B_s": "2", "C_s": "3",
> .
> .
> .
> *          }*
> // appending '_s' to 'name' attribute for making dynamic fields.
>
>
> But using RegexTransformer and 'splitBy', I can only split string by ',' .
> I further want to split it by '=' .
>
> *Actual:*
> "docs": [ {
> "COL1": "F",
> "COL2": "ASDF", "COL3": [ "A=1", "B=2", "C=3",
> .
> .
> .
> "Z=26"
> ]
> *          }*
>
>
> *db-data-config.xml:*
>
> <dataConfig>
>
>     <dataSource name="a1" driver="oracle.jdbc.driver.OracleDriver"
> url="***" user="***" password="***"/>
>
>
>     <document>
>         <entity name="e1" query="SELECT col1,col2, col3 FROM tableName"
>                  dataSource="a1" pk="col1">
>             <field column="col1" name="col1" />
>             <field column="col2" name="col2" />
>             <field column="col3" name="col3" splitBy="," >
>
>     </document>
> </dataConfig>
>
> Please Help me to find solution.
>
> Thanks,
> Pankaj

Reply via email to