Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3189

Removing a field using TemplateTransformer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      While importing documents through DataImportHandler I need to remove some fields from the final SolrDocument before it's submitted to Solr.
      My usecase: the import query returns an A column which I use to fill in the B field on the Solr instance. My Solr schema contains both the A and B fields, so they are both filled in through dih. I'd like to force the deletion of A from the generated SolrDocument since I need a value only on the B field and want to leave empty the A field. The only way I found is using ScriptTransformer, so I thought it could be useful to add this feature to the TemplateTransformer.

      Attachments

        1. SOLR-3189.patch
          6 kB
          Luca Cavanna

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lucacavanna Luca Cavanna
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: