org.apache.solr.handler.clustering.carrot2

## Class SolrStopwordsCarrot2LexicalDataFactory

- java.lang.Object
- - org.apache.solr.handler.clustering.carrot2.SolrStopwordsCarrot2LexicalDataFactory

- All Implemented Interfaces:
    org.carrot2.text.linguistic.ILexicalDataFactory

      @Bindable
      public class SolrStopwordsCarrot2LexicalDataFactory
      extends Object
      implements org.carrot2.text.linguistic.ILexicalDataFactory

  An implementation of Carrot2's `ILexicalDataFactory` that adds stop words from a field's StopFilter to the default stop words used in Carrot2, for all languages Carrot2 supports. Completely replacing Carrot2 stop words with Solr's wouldn't make much sense because clustering needs more aggressive stop words removal. In other words, if something is a stop word during indexing, then it should also be a stop word during clustering, but not the other way round.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `org.carrot2.text.linguistic.DefaultLexicalDataFactory` | `carrot2LexicalDataFactory` Carrot2's default lexical resources to use in addition to Solr's stop words.
    `SolrCore` | `core`
    `Set<String>` | `fieldNames`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolrStopwordsCarrot2LexicalDataFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.carrot2.text.linguistic.ILexicalData` | `getLexicalData(org.carrot2.core.LanguageCode languageCode)`

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

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

- - ### Field Detail

    - #### core

          @Input
           @Attribute(key="solrCore")
          public SolrCore core

    - #### fieldNames

          @Processing
           @Input
           @Attribute(key="solrFieldNames")
          public Set<String> fieldNames

    - #### carrot2LexicalDataFactory

          public org.carrot2.text.linguistic.DefaultLexicalDataFactory carrot2LexicalDataFactory

      Carrot2's default lexical resources to use in addition to Solr's stop words.

  - ### Constructor Detail

    - #### SolrStopwordsCarrot2LexicalDataFactory

          public SolrStopwordsCarrot2LexicalDataFactory()

  - ### Method Detail

    - #### getLexicalData

          public org.carrot2.text.linguistic.ILexicalData getLexicalData(org.carrot2.core.LanguageCode languageCode)

      Specified by:
        `getLexicalData` in interface `org.carrot2.text.linguistic.ILexicalDataFactory`

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