[
https://issues.apache.org/jira/browse/SOLR-969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665699#action_12665699
]
Noble Paul commented on SOLR-969:
---------------------------------
All the Objects can be consumed directly from JS , just the way we use it in
java .
example
{code}
<dataConfig>
<script><![CDATA[
function f1(row, context) {
var cmd =
context.getVariableResolver().replaceTokens('${dataimporter.request.command}');
if(cmd == 'full-import')
row.put('message', 'The command is full-import');
return row;
}
]]></script>
<document>
<entity name="e" pk="id" transformer="script:f1" query="select
* from X">
....
</entity>
</document>
</dataConfig>
{code}
Currently only a Transformer can be written in JS and that is the most common
extension point.
It is hard to write a DataSource/EntityProcessor in JS . I'm interested in
having an Entityprocessor written in non-java. but there has not been much
interest in it.
an Eventlistener can be easily written in JS (but not yet implemented)
> Context#FULL_DUMP, DELTA_DUMP, FIND_DELTA as an enum
> -----------------------------------------------------
>
> Key: SOLR-969
> URL: https://issues.apache.org/jira/browse/SOLR-969
> Project: Solr
> Issue Type: Improvement
> Components: contrib - DataImportHandler
> Environment: Java 6, Tomcat 6
> Reporter: Kay Kay
> Fix For: 1.4
>
> Attachments: SOLR-969.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Context # FULL_DUMP, DELTA_DUMP, FIND_DELTA made type-safe as an enum.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.