Class LanguagePrefixedTextField


  • public class LanguagePrefixedTextField
    extends org.apache.solr.schema.TextField
    A custom TextField type which is able to set at runtime the analyzer to be used. Although the core part of the logic needed for that dynamic assignment is in LanguagePrefixedTokenStream the actors group is also composed by: Both of them have no specific logic: they exist only because the components involved in the analysis chain don't have access to the IndexSchema instance (e.g. a Tokenizer is a schema concept, while IndexSchema belongs to Solr classes). On top of that, the purpose of this class is to associate to this field type the index and query time analyzer.
    Author:
    Andrea Gazzarini
    See Also:
    LanguagePrefixedTokenStream, LanguagePrefixedTextAnalyzer
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.solr.schema.FieldType

        org.apache.solr.schema.FieldType.DefaultAnalyzer, org.apache.solr.schema.FieldType.MultiValueSelector
    • Field Summary

      • Fields inherited from class org.apache.solr.schema.TextField

        autoGeneratePhraseQueries, enableGraphQueries, multiTermAnalyzer
      • Fields inherited from class org.apache.solr.schema.FieldType

        ANALYZER, args, AUTO_GENERATE_PHRASE_QUERIES, CHAR_FILTER, CHAR_FILTERS, CLASS_NAME, docValuesFormat, ENABLE_GRAPH_QUERIES, falseProperties, FILTER, FILTERS, INDEX, INDEX_ANALYZER, MULTI_TERM, MULTI_TERM_ANALYZER, POLY_FIELD_SEPARATOR, postingsFormat, properties, QUERY, QUERY_ANALYZER, similarity, SIMILARITY, similarityFactory, TOKENIZER, trueProperties, TYPE, TYPE_NAME, typeName
      • Fields inherited from class org.apache.solr.schema.FieldProperties

        BINARY, DOC_VALUES, INDEXED, LARGE_FIELD, MULTIVALUED, OMIT_NORMS, OMIT_POSITIONS, OMIT_TF_POSITIONS, REQUIRED, SORT_MISSING_FIRST, SORT_MISSING_LAST, STORE_OFFSETS, STORE_TERMOFFSETS, STORE_TERMPAYLOADS, STORE_TERMPOSITIONS, STORE_TERMVECTORS, STORED, TOKENIZED, USE_DOCVALUES_AS_STORED
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void init​(org.apache.solr.schema.IndexSchema schema, java.util.Map<java.lang.String,​java.lang.String> args)  
      • Methods inherited from class org.apache.solr.schema.TextField

        analyzeMultiTerm, getAutoGeneratePhraseQueries, getEnableGraphQueries, getFieldQuery, getMultiTermAnalyzer, getRangeQuery, getSortField, getUninversionType, getValueSource, isExplicitMultiTermAnalyzer, marshalSortValue, setIsExplicitMultiTermAnalyzer, setMultiTermAnalyzer, supportsAnalyzers, toObject, unmarshalSortValue, write
      • Methods inherited from class org.apache.solr.schema.FieldType

        checkSchemaField, checkSupportsDocValues, createField, createField, createFields, getAnalyzerProperties, getClassArg, getDocValuesFormat, getIndexAnalyzer, getIndexOptions, getNamedPropertyValues, getNonFieldPropertyArgs, getNumberType, getNumericType, getPostingsFormat, getPrefixQuery, getQueryAnalyzer, getRewriteMethod, getSetQuery, getSimilarity, getSimilarityFactory, getSingleValueSource, getStringSort, getTypeName, hasProperty, indexedToReadable, indexedToReadable, isExplicitAnalyzer, isExplicitQueryAnalyzer, isMultiValued, isPointField, isPolyField, isTokenized, marshalBase64SortValue, marshalStringSortValue, multiValuedFieldCache, readableToIndexed, readableToIndexed, restrictProps, setArgs, setIndexAnalyzer, setIsExplicitAnalyzer, setIsExplicitQueryAnalyzer, setQueryAnalyzer, setSimilarity, storedToIndexed, storedToReadable, toExternal, toInternal, toNativeType, toObject, toString, unmarshalBase64SortValue, unmarshalStringSortValue, useDocValuesAsStored
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LanguagePrefixedTextField

        public LanguagePrefixedTextField()
    • Method Detail

      • init

        protected final void init​(org.apache.solr.schema.IndexSchema schema,
                                  java.util.Map<java.lang.String,​java.lang.String> args)
        Overrides:
        init in class org.apache.solr.schema.TextField