org.apache.solr.update.processor

## Class ClassificationUpdateProcessorFactory

- java.lang.Object
- - org.apache.solr.update.processor.UpdateRequestProcessorFactory
  - - org.apache.solr.update.processor.ClassificationUpdateProcessorFactory

- All Implemented Interfaces:
    NamedListInitializedPlugin

      public class ClassificationUpdateProcessorFactory
      extends UpdateRequestProcessorFactory

  This class implements an UpdateProcessorFactory for the Classification Update Processor. It takes in input a series of parameter that will be necessary to instantiate and use the Classifier

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.solr.update.processor.UpdateRequestProcessorFactory

      `UpdateRequestProcessorFactory.RunAlways`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassificationUpdateProcessorFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAlgorithm()` get the name of the classifier algorithm used
    `String` | `getClassFieldName()` get field names used as classifier's output
    `String[]` | `getInputFieldNames()` get field names used as classifier's inputs
    `UpdateRequestProcessor` | `getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)`
    `int` | `getK()` get the the no.
    `int` | `getMinDf()` get the min document frequency value to be used in case algorithm is `"knn"`
    `int` | `getMinTf()` get the min term frequency value to be used in case algorithm is `"knn"`
    `void` | `init(NamedList args)`
    `void` | `setAlgorithm(String algorithm)` set the name of the classifier algorithm used
    `void` | `setClassFieldName(String classFieldName)` set field names used as classifier's output
    `void` | `setInputFieldNames(String[] inputFieldNames)` set field names used as classifier's inputs
    `void` | `setK(int k)` set the the no.
    `void` | `setMinDf(int minDf)` set the min document frequency value to be used in case algorithm is `"knn"`
    `void` | `setMinTf(int minTf)` set the min term frequency value to be used in case algorithm is `"knn"`

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

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

- - ### Constructor Detail

    - #### ClassificationUpdateProcessorFactory

          public ClassificationUpdateProcessorFactory()

  - ### Method Detail

    - #### init

          public void init(NamedList args)

      Specified by:
        `init` in interface `NamedListInitializedPlugin`
      Overrides:
        `init` in class `UpdateRequestProcessorFactory`

    - #### getInstance

          public UpdateRequestProcessor getInstance(SolrQueryRequest req,
                                                    SolrQueryResponse rsp,
                                                    UpdateRequestProcessor next)

      Specified by:
        `getInstance` in class `UpdateRequestProcessorFactory`

    - #### getInputFieldNames

          public String[] getInputFieldNames()

      get field names used as classifier's inputs
      Returns:
        the input field names

    - #### setInputFieldNames

          public void setInputFieldNames(String[] inputFieldNames)

      set field names used as classifier's inputs
      Parameters:
        `inputFieldNames` - the input field names

    - #### getClassFieldName

          public String getClassFieldName()

      get field names used as classifier's output
      Returns:
        the output field name

    - #### setClassFieldName

          public void setClassFieldName(String classFieldName)

      set field names used as classifier's output
      Parameters:
        `classFieldName` - the output field name

    - #### getAlgorithm

          public String getAlgorithm()

      get the name of the classifier algorithm used
      Returns:
        the classifier algorithm used

    - #### setAlgorithm

          public void setAlgorithm(String algorithm)

      set the name of the classifier algorithm used
      Parameters:
        `algorithm` - the classifier algorithm used

    - #### getMinTf

          public int getMinTf()

      get the min term frequency value to be used in case algorithm is `"knn"`
      Returns:
        the min term frequency

    - #### setMinTf

          public void setMinTf(int minTf)

      set the min term frequency value to be used in case algorithm is `"knn"`
      Parameters:
        `minTf` - the min term frequency

    - #### getMinDf

          public int getMinDf()

      get the min document frequency value to be used in case algorithm is `"knn"`
      Returns:
        the min document frequency

    - #### setMinDf

          public void setMinDf(int minDf)

      set the min document frequency value to be used in case algorithm is `"knn"`
      Parameters:
        `minDf` - the min document frequency

    - #### getK

          public int getK()

      get the the no. of nearest neighbor to analyze, to be used in case algorithm is `"knn"`
      Returns:
        the no. of neighbors to analyze

    - #### setK

          public void setK(int k)

      set the the no. of nearest neighbor to analyze, to be used in case algorithm is `"knn"`
      Parameters:
        `k` - the no. of neighbors to analyze

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