org.apache.solr.schema

## Class FieldType

- java.lang.Object
- - org.apache.solr.schema.FieldProperties
  - - org.apache.solr.schema.FieldType

- Direct Known Subclasses:
    AbstractSpatialFieldType, AbstractSubTypeFieldType, BinaryField, CollationField, CurrencyField, ExternalFileField, GeoHashField, PrimitiveFieldType, RandomSortField, TextField

      public abstract class FieldType
      extends FieldProperties

  Base class for all field types used by an index schema.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `FieldType.DefaultAnalyzer` Default analyzer for types that only produce 1 verbatim token...
    `static class` | `FieldType.MultiValueSelector` An enumeration representing various options that may exist for selecting a single value from a multivalued field.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ANALYZER`
    `protected Map<String,String>` | `args` additional arguments specified in the field type declaration
    `static String` | `CHAR_FILTER`
    `static String` | `CHAR_FILTERS`
    `static String` | `CLASS_NAME`
    `protected String` | `docValuesFormat` The docvalues format used for this field type
    `protected int` | `falseProperties` properties explicitly set to false
    `static String` | `FILTER`
    `static String` | `FILTERS`
    `static String` | `INDEX`
    `static String` | `INDEX_ANALYZER`
    `static String` | `MULTI_TERM`
    `static String` | `MULTI_TERM_ANALYZER`
    `static String` | `POLY_FIELD_SEPARATOR` The default poly field separator.
    `protected String` | `postingsFormat` The postings format used for this field type
    `protected int` | `properties`
    `static String` | `QUERY`
    `static String` | `QUERY_ANALYZER`
    `protected Similarity` | `similarity`
    `static String` | `SIMILARITY`
    `protected SimilarityFactory` | `similarityFactory`
    `static String` | `TOKENIZER`
    `protected int` | `trueProperties` properties explicitly set to true
    `static String` | `TYPE`
    `static String` | `TYPE_NAME`
    `protected String` | `typeName` The name of the type (not the name of the field)

    - ### Fields inherited from class org.apache.solr.schema.FieldProperties

      `BINARY, DOC_VALUES, INDEXED, 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`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FieldType()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkSchemaField(SchemaField field)` Check's `SchemaField` instances constructed using this field type to ensure that they are valid.
    `IndexableField` | `createField(SchemaField field, Object value, float boost)` Used for adding a document when a field needs to be created from a type and a string.
    `protected IndexableField` | `createField(String name, String val, FieldType type, float boost)` Create the field from native Lucene parts.
    `List<IndexableField>` | `createFields(SchemaField field, Object value, float boost)` Given a `SchemaField`, create one or more `IndexableField` instances
    `protected static SimpleOrderedMap<Object>` | `getAnalyzerProperties(Analyzer analyzer)` Returns a description of the given analyzer, by either reporting the Analyzer class name (and optionally luceneMatchVersion) if it's not a TokenizerChain, or if it is, querying each analysis factory for its name and args.
    `String` | `getClassArg()`
    `String` | `getDocValuesFormat()`
    `Query` | `getFieldQuery(QParser parser, SchemaField field, String externalVal)` Returns a Query instance for doing searches against a field.
    `Analyzer` | `getIndexAnalyzer()` Returns the Analyzer to be used when indexing fields of this type.
    `protected IndexOptions` | `getIndexOptions(SchemaField field, String internalVal)`
    `SimpleOrderedMap<Object>` | `getNamedPropertyValues(boolean showDefaults)` Get a map of property name -> value for this field type.
    `protected Map<String,String>` | `getNonFieldPropertyArgs()` Returns args to this field type that aren't standard field properties
    `FieldType.LegacyNumericType` | `getNumericType()` Return the numeric type of this field, or null if this field is not a numeric field.
    `String` | `getPostingsFormat()`
    `Query` | `getPrefixQuery(QParser parser, SchemaField sf, String termStr)` Returns a Query instance for doing prefix searches on this field type.
    `Analyzer` | `getQueryAnalyzer()` Returns the Analyzer to be used when searching fields of this type.
    `Query` | `getRangeQuery(QParser parser, SchemaField field, String part1, String part2, boolean minInclusive, boolean maxInclusive)` Returns a Query instance for doing range searches on this field type.
    `MultiTermQuery.RewriteMethod` | `getRewriteMethod(QParser parser, SchemaField field)` Expert: Returns the rewrite method for multiterm queries such as wildcards.
    `Similarity` | `getSimilarity()` Gets the Similarity used when scoring fields of this type
    `SimilarityFactory` | `getSimilarityFactory()` Gets the factory for the Similarity used when scoring fields of this type
    `ValueSource` | `getSingleValueSource(FieldType.MultiValueSelector choice, SchemaField field, QParser parser)` Method for dynamically building a ValueSource based on a single value of a multivalued field.
    `abstract SortField` | `getSortField(SchemaField field, boolean top)` Returns the SortField instance that should be used to sort fields of this type.
    `protected SortField` | `getStringSort(SchemaField field, boolean reverse)` Utility usable by subclasses when they want to get basic String sorting using common checks.
    `String` | `getTypeName()` The Name of this FieldType as specified in the schema file
    `abstract UninvertingReader.Type` | `getUninversionType(SchemaField sf)` DocValues is not enabled for a field, but it's indexed, docvalues can be constructed on the fly (uninverted, aka fieldcache) on the first request to sort, facet, etc.
    `ValueSource` | `getValueSource(SchemaField field, QParser parser)` called to get the default value source (normally, from the Lucene FieldCache.)
    `protected boolean` | `hasProperty(int p)` Check if a property is set
    `CharsRef` | `indexedToReadable(BytesRef input, CharsRefBuilder output)` Given an indexed term, append the human readable representation
    `String` | `indexedToReadable(String indexedForm)` Given an indexed term, return the human readable representation
    `protected void` | `init(IndexSchema schema, Map<String,String> args)` subclasses should initialize themselves with the args provided and remove valid arguments.
    `boolean` | `isExplicitAnalyzer()`
    `boolean` | `isExplicitQueryAnalyzer()`
    `boolean` | `isMultiValued()` Returns true if fields can have multiple values
    `boolean` | `isPolyField()` A "polyField" is a FieldType that can produce more than one IndexableField instance for a single value, via the `createFields(org.apache.solr.schema.SchemaField, Object, float)` method.
    `boolean` | `isTokenized()` Returns true if fields of this type should be tokenized
    `protected static Object` | `marshalBase64SortValue(Object value)` Marshals a binary field value.
    `Object` | `marshalSortValue(Object value)` Convert a value used by the FieldComparator for this FieldType's SortField into a marshalable value for distributed sorting.
    `protected static Object` | `marshalStringSortValue(Object value)` Marshals a string-based field value.
    `boolean` | `multiValuedFieldCache()` Returns true if a single field value of this type has multiple logical values for the purposes of faceting, sorting, etc.
    `void` | `readableToIndexed(CharSequence val, BytesRefBuilder result)` Given the readable value, return the term value that will match it.
    `String` | `readableToIndexed(String val)` Given the readable value, return the term value that will match it.
    `protected void` | `restrictProps(int props)` :TODO: document this method
    `protected void` | `setArgs(IndexSchema schema, Map<String,String> args)`
    `void` | `setIndexAnalyzer(Analyzer analyzer)` Sets the Analyzer to be used when indexing fields of this type.
    `void` | `setIsExplicitAnalyzer(boolean explicitAnalyzer)`
    `void` | `setIsExplicitQueryAnalyzer(boolean isExplicitQueryAnalyzer)`
    `void` | `setQueryAnalyzer(Analyzer analyzer)` Sets the Analyzer to be used when querying fields of this type.
    `void` | `setSimilarity(SimilarityFactory similarityFactory)` Sets the Similarity used when scoring fields of this type
    `String` | `storedToIndexed(IndexableField f)` Given the stored field, return the indexed form
    `String` | `storedToReadable(IndexableField f)` Given the stored field, return the human readable representation
    `protected boolean` | `supportsAnalyzers()` Returns true if this type supports index and query analyzers, false otherwise.
    `String` | `toExternal(IndexableField f)` Convert the stored-field format to an external (string, human readable) value
    `String` | `toInternal(String val)` Convert an external value (from XML update command or from query string) into the internal format for both storing and indexing (which can be modified by any analyzers).
    `Object` | `toNativeType(Object val)` Converts any Object to a java Object native to this field type
    `Object` | `toObject(IndexableField f)` Convert the stored-field format to an external object.
    `Object` | `toObject(SchemaField sf, BytesRef term)`
    `String` | `toString()`
    `protected static Object` | `unmarshalBase64SortValue(Object value)` Unmarshals a binary field value.
    `Object` | `unmarshalSortValue(Object value)` Convert a value marshaled via `marshalSortValue(java.lang.Object)` back into a value usable by the FieldComparator for this FieldType's SortField
    `protected static Object` | `unmarshalStringSortValue(Object value)` Unmarshals a string-based field value.
    `boolean` | `useDocValuesAsStored()` Returns true if the fields' docValues should be used for obtaining stored value
    `abstract void` | `write(TextResponseWriter writer, String name, IndexableField f)` calls back to TextResponseWriter to write the field value

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

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

- - ### Field Detail

    - #### POLY_FIELD_SEPARATOR

          public static final String POLY_FIELD_SEPARATOR

      The default poly field separator.
      See Also:
        `createFields(SchemaField, Object, float)`, `isPolyField()`, Constant Field Values

    - #### typeName

          protected String typeName

      The name of the type (not the name of the field)

    - #### args

          protected Map<String,String> args

      additional arguments specified in the field type declaration

    - #### trueProperties

          protected int trueProperties

      properties explicitly set to true

    - #### falseProperties

          protected int falseProperties

      properties explicitly set to false

    - #### properties

          protected int properties

    - #### similarityFactory

          protected SimilarityFactory similarityFactory

      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

    - #### similarity

          protected Similarity similarity

      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

    - #### postingsFormat

          protected String postingsFormat

      The postings format used for this field type

    - #### docValuesFormat

          protected String docValuesFormat

      The docvalues format used for this field type

    - #### TYPE

          public static final String TYPE

      See Also:
        Constant Field Values

    - #### TYPE_NAME

          public static final String TYPE_NAME

      See Also:
        Constant Field Values

    - #### CLASS_NAME

          public static final String CLASS_NAME

      See Also:
        Constant Field Values

    - #### ANALYZER

          public static final String ANALYZER

      See Also:
        Constant Field Values

    - #### INDEX

          public static final String INDEX

      See Also:
        Constant Field Values

    - #### INDEX_ANALYZER

          public static final String INDEX_ANALYZER

      See Also:
        Constant Field Values

    - #### QUERY

          public static final String QUERY

      See Also:
        Constant Field Values

    - #### QUERY_ANALYZER

          public static final String QUERY_ANALYZER

      See Also:
        Constant Field Values

    - #### MULTI_TERM

          public static final String MULTI_TERM

      See Also:
        Constant Field Values

    - #### MULTI_TERM_ANALYZER

          public static final String MULTI_TERM_ANALYZER

      See Also:
        Constant Field Values

    - #### SIMILARITY

          public static final String SIMILARITY

      See Also:
        Constant Field Values

    - #### CHAR_FILTER

          public static final String CHAR_FILTER

      See Also:
        Constant Field Values

    - #### CHAR_FILTERS

          public static final String CHAR_FILTERS

      See Also:
        Constant Field Values

    - #### TOKENIZER

          public static final String TOKENIZER

      See Also:
        Constant Field Values

    - #### FILTER

          public static final String FILTER

      See Also:
        Constant Field Values

    - #### FILTERS

          public static final String FILTERS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FieldType

          public FieldType()

  - ### Method Detail

    - #### isTokenized

          public boolean isTokenized()

      Returns true if fields of this type should be tokenized

    - #### isMultiValued

          public boolean isMultiValued()

      Returns true if fields can have multiple values

    - #### hasProperty

          protected boolean hasProperty(int p)

      Check if a property is set

    - #### isPolyField

          public boolean isPolyField()

      A "polyField" is a FieldType that can produce more than one IndexableField instance for a single value, via the `createFields(org.apache.solr.schema.SchemaField, Object, float)` method. This is useful when hiding the implementation details of a field from the Solr end user. For instance, a spatial point may be represented by multiple different fields.
      Returns:
        true if the `createFields(org.apache.solr.schema.SchemaField, Object, float)` method may return more than one field

    - #### useDocValuesAsStored

          public boolean useDocValuesAsStored()

      Returns true if the fields' docValues should be used for obtaining stored value

    - #### multiValuedFieldCache

          public boolean multiValuedFieldCache()

      Returns true if a single field value of this type has multiple logical values for the purposes of faceting, sorting, etc. Text fields normally return true since each token/word is a logical value.

    - #### init

          protected void init(IndexSchema schema,
                              Map<String,String> args)

      subclasses should initialize themselves with the args provided and remove valid arguments. leftover arguments will cause an exception. Common boolean properties have already been handled.

    - #### setArgs

          protected void setArgs(IndexSchema schema,
                                 Map<String,String> args)

    - #### restrictProps

          protected void restrictProps(int props)

      :TODO: document this method

    - #### getTypeName

          public String getTypeName()

      The Name of this FieldType as specified in the schema file

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### createField

          public IndexableField createField(SchemaField field,
                                            Object value,
                                            float boost)

      Used for adding a document when a field needs to be created from a type and a string.

      By default, the indexed value is the same as the stored value (taken from toInternal()). Having a different representation for external, internal, and indexed would present quite a few problems given the current Lucene architecture. An analyzer for adding docs would need to translate internal->indexed while an analyzer for querying would need to translate external->indexed.

      The only other alternative to having internal==indexed would be to have internal==external. In this case, toInternal should convert to the indexed representation, toExternal() should do nothing, and createField() should *not* call toInternal, but use the external value and set tokenized=true to get Lucene to convert to the internal(indexed) form.

      :TODO: clean up and clarify this explanation.
      See Also:
        `toInternal(java.lang.String)`

    - #### createField

          protected IndexableField createField(String name,
                                               String val,
                                               FieldType type,
                                               float boost)

      Create the field from native Lucene parts. Mostly intended for use by FieldTypes outputing multiple Fields per SchemaField
      Parameters:
        `name` - The name of the field
        `val` - The _internal_ value to index
        `type` - `FieldType`
        `boost` - The boost value
      Returns:
        the `IndexableField`.

    - #### createFields

          public List<IndexableField> createFields(SchemaField field,
                                                   Object value,
                                                   float boost)

      Given a `SchemaField`, create one or more `IndexableField` instances
      Parameters:
        `field` - the `SchemaField`
        `value` - The value to add to the field
        `boost` - The boost to apply
      Returns:
        An array of `IndexableField`
      See Also:
        `createField(SchemaField, Object, float)`, `isPolyField()`

    - #### getIndexOptions

          protected IndexOptions getIndexOptions(SchemaField field,
                                                 String internalVal)

    - #### toInternal

          public String toInternal(String val)

      Convert an external value (from XML update command or from query string) into the internal format for both storing and indexing (which can be modified by any analyzers).
      See Also:
        `toExternal(org.apache.lucene.index.IndexableField)`

    - #### toExternal

          public String toExternal(IndexableField f)

      Convert the stored-field format to an external (string, human readable) value
      See Also:
        `toInternal(java.lang.String)`

    - #### toObject

          public Object toObject(IndexableField f)

      Convert the stored-field format to an external object.
      Since:
        solr 1.3
      See Also:
        `toInternal(java.lang.String)`

    - #### toObject

          public Object toObject(SchemaField sf,
                                 BytesRef term)

    - #### indexedToReadable

          public String indexedToReadable(String indexedForm)

      Given an indexed term, return the human readable representation

    - #### indexedToReadable

          public CharsRef indexedToReadable(BytesRef input,
                                            CharsRefBuilder output)

      Given an indexed term, append the human readable representation

    - #### storedToReadable

          public String storedToReadable(IndexableField f)

      Given the stored field, return the human readable representation

    - #### storedToIndexed

          public String storedToIndexed(IndexableField f)

      Given the stored field, return the indexed form

    - #### readableToIndexed

          public String readableToIndexed(String val)

      Given the readable value, return the term value that will match it.

    - #### readableToIndexed

          public void readableToIndexed(CharSequence val,
                                        BytesRefBuilder result)

      Given the readable value, return the term value that will match it.

    - #### setIsExplicitQueryAnalyzer

          public void setIsExplicitQueryAnalyzer(boolean isExplicitQueryAnalyzer)

    - #### isExplicitQueryAnalyzer

          public boolean isExplicitQueryAnalyzer()

    - #### setIsExplicitAnalyzer

          public void setIsExplicitAnalyzer(boolean explicitAnalyzer)

    - #### isExplicitAnalyzer

          public boolean isExplicitAnalyzer()

    - #### getClassArg

          public String getClassArg()

      Returns:
        the string used to specify the concrete class name in a serialized representation: the class arg. If the concrete class name was not specified via a class arg, returns `getClass().getName()`.

    - #### getPrefixQuery

          public Query getPrefixQuery(QParser parser,
                                      SchemaField sf,
                                      String termStr)

      Returns a Query instance for doing prefix searches on this field type. Also, other QueryParser implementations may have different semantics.

      Sub-classes should override this method to provide their own range query implementation.

      Parameters:
        `parser` - the `QParser` calling the method
        `sf` - the schema field
        `termStr` - the term string for prefix query
      Returns:
        a Query instance to perform prefix search

    - #### getUninversionType

          public abstract UninvertingReader.Type getUninversionType(SchemaField sf)

      DocValues is not enabled for a field, but it's indexed, docvalues can be constructed on the fly (uninverted, aka fieldcache) on the first request to sort, facet, etc. This specifies the structure to use.
      Parameters:
        `sf` - field instance
      Returns:
        type to uninvert, or `null` (to disallow uninversion for the field)

    - #### getIndexAnalyzer

          public Analyzer getIndexAnalyzer()

      Returns the Analyzer to be used when indexing fields of this type.

      This method may be called many times, at any time.

      See Also:
        `getQueryAnalyzer()`

    - #### getQueryAnalyzer

          public Analyzer getQueryAnalyzer()

      Returns the Analyzer to be used when searching fields of this type.

      This method may be called many times, at any time.

      See Also:
        `getIndexAnalyzer()`

    - #### supportsAnalyzers

          protected boolean supportsAnalyzers()

      Returns true if this type supports index and query analyzers, false otherwise.

    - #### setIndexAnalyzer

          public final void setIndexAnalyzer(Analyzer analyzer)

      Sets the Analyzer to be used when indexing fields of this type.

      Subclasses should override `supportsAnalyzers()` to enable this function.

      See Also:
        `supportsAnalyzers()`, `setQueryAnalyzer(org.apache.lucene.analysis.Analyzer)`, `getIndexAnalyzer()`

    - #### setQueryAnalyzer

          public final void setQueryAnalyzer(Analyzer analyzer)

      Sets the Analyzer to be used when querying fields of this type.

      Subclasses should override `supportsAnalyzers()` to enable this function.

      See Also:
        `supportsAnalyzers()`, `setIndexAnalyzer(org.apache.lucene.analysis.Analyzer)`, `getQueryAnalyzer()`

    - #### getSimilarity

          public Similarity getSimilarity()

      Gets the Similarity used when scoring fields of this type

      The default implementation returns null, which means this type has no custom similarity associated with it.

      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

    - #### getSimilarityFactory

          public SimilarityFactory getSimilarityFactory()

      Gets the factory for the Similarity used when scoring fields of this type

      The default implementation returns null, which means this type has no custom similarity factory associated with it.

      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

    - #### getNumericType

          public FieldType.LegacyNumericType getNumericType()

      Return the numeric type of this field, or null if this field is not a numeric field.

    - #### setSimilarity

          public void setSimilarity(SimilarityFactory similarityFactory)

      Sets the Similarity used when scoring fields of this type
      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

    - #### getPostingsFormat

          public String getPostingsFormat()

    - #### getDocValuesFormat

          public final String getDocValuesFormat()

    - #### write

          public abstract void write(TextResponseWriter writer,
                                     String name,
                                     IndexableField f)
                              throws IOException

      calls back to TextResponseWriter to write the field value
      Throws:
        `IOException`

    - #### getSortField

          public abstract SortField getSortField(SchemaField field,
                                                 boolean top)

      Returns the SortField instance that should be used to sort fields of this type.
      See Also:
        `SchemaField.checkSortability()`

    - #### getStringSort

          protected SortField getStringSort(SchemaField field,
                                            boolean reverse)

      Utility usable by subclasses when they want to get basic String sorting using common checks.
      See Also:
        `SchemaField.checkSortability()`

    - #### getValueSource

          public ValueSource getValueSource(SchemaField field,
                                            QParser parser)

      called to get the default value source (normally, from the Lucene FieldCache.)

    - #### getSingleValueSource

          public ValueSource getSingleValueSource(FieldType.MultiValueSelector choice,
                                                  SchemaField field,
                                                  QParser parser)

      Method for dynamically building a ValueSource based on a single value of a multivalued field. The default implementation throws an error except in the trivial case where this method is used on a `SchemaField` that is in fact not-multivalued, in which case it delegates to `getValueSource(org.apache.solr.schema.SchemaField, org.apache.solr.search.QParser)`
      See Also:
        `FieldType.MultiValueSelector`

    - #### getRangeQuery

          public Query getRangeQuery(QParser parser,
                                     SchemaField field,
                                     String part1,
                                     String part2,
                                     boolean minInclusive,
                                     boolean maxInclusive)

      Returns a Query instance for doing range searches on this field type. `SolrQueryParser` currently passes part1 and part2 as null if they are '*' respectively. minInclusive and maxInclusive are both true currently by SolrQueryParser but that may change in the future. Also, other QueryParser implementations may have different semantics.

      Sub-classes should override this method to provide their own range query implementation. They should strive to handle nulls in part1 and/or part2 as well as unequal minInclusive and maxInclusive parameters gracefully.

      Parameters:
        `parser` - the `QParser` calling the method
        `field` - the schema field
        `part1` - the lower boundary of the range, nulls are allowed.
        `part2` - the upper boundary of the range, nulls are allowed
        `minInclusive` - whether the minimum of the range is inclusive or not
        `maxInclusive` - whether the maximum of the range is inclusive or not
      Returns:
        a Query instance to perform range search according to given parameters

    - #### getFieldQuery

          public Query getFieldQuery(QParser parser,
                                     SchemaField field,
                                     String externalVal)

      Returns a Query instance for doing searches against a field.
      Parameters:
        `parser` - The `QParser` calling the method
        `field` - The `SchemaField` of the field to search
        `externalVal` - The String representation of the value to search
      Returns:
        The `Query` instance. This implementation returns a `TermQuery` but overriding queries may not

    - #### getRewriteMethod

          public MultiTermQuery.RewriteMethod getRewriteMethod(QParser parser,
                                                               SchemaField field)

      Expert: Returns the rewrite method for multiterm queries such as wildcards.
      Parameters:
        `parser` - The `QParser` calling the method
        `field` - The `SchemaField` of the field to search
      Returns:
        A suitable rewrite method for rewriting multi-term queries to primitive queries.

    - #### checkSchemaField

          public void checkSchemaField(SchemaField field)

      Check's `SchemaField` instances constructed using this field type to ensure that they are valid.

      This method is called by the `SchemaField` constructor to check that its initialization does not violate any fundemental requirements of the `FieldType`. The default implementation does nothing, but subclasses may chose to throw a `SolrException` if invariants are violated by the `SchemaField.`

    - #### getNamedPropertyValues

          public SimpleOrderedMap<Object> getNamedPropertyValues(boolean showDefaults)

      Get a map of property name -> value for this field type.
      Parameters:
        `showDefaults` - if true, include default properties.

    - #### getNonFieldPropertyArgs

          protected Map<String,String> getNonFieldPropertyArgs()

      Returns args to this field type that aren't standard field properties

    - #### getAnalyzerProperties

          protected static SimpleOrderedMap<Object> getAnalyzerProperties(Analyzer analyzer)

      Returns a description of the given analyzer, by either reporting the Analyzer class name (and optionally luceneMatchVersion) if it's not a TokenizerChain, or if it is, querying each analysis factory for its name and args.

    - #### toNativeType

          public Object toNativeType(Object val)

      Converts any Object to a java Object native to this field type

    - #### marshalSortValue

          public Object marshalSortValue(Object value)

      Convert a value used by the FieldComparator for this FieldType's SortField into a marshalable value for distributed sorting.

    - #### unmarshalSortValue

          public Object unmarshalSortValue(Object value)

      Convert a value marshaled via `marshalSortValue(java.lang.Object)` back into a value usable by the FieldComparator for this FieldType's SortField

    - #### marshalStringSortValue

          protected static Object marshalStringSortValue(Object value)

      Marshals a string-based field value.

    - #### unmarshalStringSortValue

          protected static Object unmarshalStringSortValue(Object value)

      Unmarshals a string-based field value.

    - #### marshalBase64SortValue

          protected static Object marshalBase64SortValue(Object value)

      Marshals a binary field value.

    - #### unmarshalBase64SortValue

          protected static Object unmarshalBase64SortValue(Object value)

      Unmarshals a binary field value.

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