I'm using the StatelessScriptUpdateProcessorFactory to run a script against 
data as it is imported.

Some relevant pieces from solrconfig.xml:

        <requestHandler name="/dataimport" 
class="org.apache.solr.handler.dataimport.DataImportHandler">
                <lst name="defaults">
                        <str name="config">data-config.xml</str>
                        <str name="update.chain">textCopyByLang</str>
                </lst>
        </requestHandler>

        <updateRequestProcessorChain name="textCopyByLang">
                <processor class="solr.StatelessScriptUpdateProcessorFactory">
                        <str name="script">textCopyByLang.js</str>
                </processor>
                <processor class="solr.LogUpdateProcessorFactory" />
                <processor class="solr.RunUpdateProcessorFactory" />
        </updateRequestProcessorChain>

In schema.xml I have a number of fields all being combined into one "text" 
field using copyField.  Unfortunately this apparently doesn't happen until 
after the processor chain has completed so the script can't make use of the 
combined text.

i.e.
        doc = cmd.solrDoc;
        text = doc.getFieldValue("text");  // text is null


Is there a way around this without duplicating all the copyFields inside the 
processing script?

Thanks,

Douglas

Reply via email to