lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Renata Mota" <renata.m...@accurate.com.br>
Subject RE: How to use dinamic field name in a function with Data import handler
Date Sat, 05 Dec 2009 17:31:48 GMT
I am using solr1.3

-----Original Message-----
From: noble.paul@gmail.com [mailto:noble.paul@gmail.com] On Behalf Of Noble
Paul ??????? ??????
Sent: Saturday, December 05, 2009 3:23 PM
To: solr-dev@lucene.apache.org
Subject: Re: How to use dinamic field name in a function with Data import
handler

it is supported and it should work. BTW which solr are you using?

On Sat, Dec 5, 2009 at 10:43 PM, Renata Mota
<renata.mota@accurate.com.br> wrote:
> Hi!
>
>
>
> I’m trying to declare a dynamic field name in a function, but it doesn’t
> accept, I am doing something wrong or it isn’t possible?
>
>
>
> EXAMPLE:
>
>
>
> <dataConfig>
>
>    <script>
>
>                        <![CDATA[
>
>                                    function relatedLevel(row)    
   {
>
>
> row.put('related_'+row.get('SOURCE_NAME')+'_lvl', row.get(‘VALUE'));
>
>                                        return row;
>
>                                    }
>
>                        ]]>
>
>    </script>
>
>    <dataSource type="JdbcDataSource"
> driver="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@localhost:XX" user="test" password="test" />
>
>            <document>
>
>                        <entity name="levelRelated"
> transformer="script:relatedLevel" query="SELECT SOURCE_NAME, VALUE FROM
> RELATED" />
>
>            </document>
>
> </dataConfig>
>
>
>
>
>
> SCHEMA:
>
>
>
>
>
> <dynamicField name="related_*" type="string" indexed="true" stored="true"
> multiValued="true"/>
>
>
>
>
>
>
>
> Renata Gonçalves Mota
>  <mailto:renata.mota@accurate.com.br> renata.mota@accurate.com.br
> Tel.: 55 11 3522-7723 R.3018
>
>
>
>



-- 
-----------------------------------------------------
Noble Paul | Systems Architect| AOL | http://aol.com


Mime
View raw message