lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeevanandam <je...@myjeeva.com>
Subject Re: How to expand list into multi-valued fields?
Date Tue, 01 May 2012 18:24:15 GMT
here you go

specify regex transformer in entity tag of DIH config xml like below

<entity ....
transformer="RegexTransformer" ... />

and then

<field column="ColumnA" name="FruitField" splitBy="\|" />

That's it!

- Jeevanandam


On 02-05-2012 12:35 am, invisbl wrote:
> I am indexing content from a RDBMS. I have a column in a table with 
> pipe
> separated values, and upon indexing I would like to transform these 
> values
> into multi-valued fields in SOLR's index. For example,
>
>     ColumnA (From RDBMS)
>     ---------------------
>     apple|orange|banana
>
> I want to expand this to,
>
>     SOLR Index
>     ------------
>     FruitField=apple
>     FruitField=orange
>     FruitField=banana
>
> or number expand to,
>
>     SOLR Index
>     ------------
>     FruitField1=apple
>     FruitField2=orange
>     FruitField3=banana
>
> Please help, thank you!
>
>
> --
> View this message in context:
> 
> http://lucene.472066.n3.nabble.com/How-to-expand-list-into-multi-valued-fields-tp3953378.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Mime
View raw message