lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (Updated) (JIRA) <j...@apache.org>
Subject [jira] [Updated] (SOLR-2599) FieldCopy Update Processor
Date Tue, 04 Oct 2011 23:00:34 GMT

     [ https://issues.apache.org/jira/browse/SOLR-2599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jan Høydahl updated SOLR-2599:
------------------------------

    Attachment: SOLR-2599.patch

Here's the processor. It's been in production for some time at a customer.

Sample config as follows:
{code}
<processor class="solr.FieldCopyProcessorFactory">
  <str name="source">category</str>
  <str name="dest">category_s</str>
</processor>
{code}

To move (rename) a field:
{code}
<processor class="solr.FieldCopyProcessorFactory">
  <str name="source">LastModified</str>
  <str name="dest">last_modified</str>
  <bool name="move">true</bool>
</processor>
{code}

To append to existing field:
{code}
<processor class="solr.FieldCopyProcessorFactory">
  <str name="source">lastname firstname</str>
  <str name="dest">fullname</str>
  <bool name="append">true</bool>
  <str name="append.delim">, </str>
</processor>
{code}

To append as values to multivalued field, with optional size cap:
{code}
<processor class="solr.FieldCopyProcessorFactory">
  <str name="source">title body</str>
  <str name="dest">text</str>
  <bool name="multival">true</bool>
  <int name="maxChars">100</int>
</processor>
{code}

                
> FieldCopy Update Processor
> --------------------------
>
>                 Key: SOLR-2599
>                 URL: https://issues.apache.org/jira/browse/SOLR-2599
>             Project: Solr
>          Issue Type: New Feature
>          Components: update
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>         Attachments: SOLR-2599.patch
>
>
> Need an UpdateProcessor which can copy and move fields

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message