org.apache.solr.morphlines.solr

## Class SanitizeUnknownSolrFieldsBuilder

- java.lang.Object
- - org.apache.solr.morphlines.solr.SanitizeUnknownSolrFieldsBuilder

- All Implemented Interfaces:
    org.kitesdk.morphline.api.CommandBuilder

      public final class SanitizeUnknownSolrFieldsBuilder
      extends Object
      implements org.kitesdk.morphline.api.CommandBuilder

  Command that sanitizes record fields that are unknown to Solr schema.xml by either deleting them (renameToPrefix is absent or a zero length string), or by moving them to a field prefixed with the given renameToPrefix (e.g. renameToPrefix = "ignored_" to use typical dynamic Solr fields).

  Recall that Solr throws an exception on any attempt to load a document that contains a field that isn't specified in schema.xml.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SanitizeUnknownSolrFieldsBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.kitesdk.morphline.api.Command` | `build(com.typesafe.config.Config config, org.kitesdk.morphline.api.Command parent, org.kitesdk.morphline.api.Command child, org.kitesdk.morphline.api.MorphlineContext context)`
    `Collection<String>` | `getNames()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SanitizeUnknownSolrFieldsBuilder

          public SanitizeUnknownSolrFieldsBuilder()

  - ### Method Detail

    - #### getNames

          public Collection<String> getNames()

      Specified by:
        `getNames` in interface `org.kitesdk.morphline.api.CommandBuilder`

    - #### build

          public org.kitesdk.morphline.api.Command build(com.typesafe.config.Config config,
                                                         org.kitesdk.morphline.api.Command parent,
                                                         org.kitesdk.morphline.api.Command child,
                                                         org.kitesdk.morphline.api.MorphlineContext context)

      Specified by:
        `build` in interface `org.kitesdk.morphline.api.CommandBuilder`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.