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 How to use dinamic field name in a function with Data import handler
Date Sat, 05 Dec 2009 17:13:20 GMT
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

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message