org.hibernate.search.elasticsearch.nulls.impl

## Class ElasticsearchNullMarkerField

- java.lang.Object
- - org.apache.lucene.document.Field
  - - org.hibernate.search.elasticsearch.impl.AbstractMarkerField
    - - org.hibernate.search.elasticsearch.nulls.impl.ElasticsearchNullMarkerField

- All Implemented Interfaces:
    IndexableField, NullMarker

      public class ElasticsearchNullMarkerField
      extends AbstractMarkerField
      implements NullMarker

  Author:
    Yoann Rodiere

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.document.Field

      `Field.Index, Field.Store, Field.TermVector`

  - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.document.Field

      `boost, fieldsData, name, tokenStream, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ElasticsearchNullMarkerField(String name, NullMarker nullMarker)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `nullEncoded()` This returns the actual value to be indexed in place of null.
    `String` | `nullRepresentedAsString()` This is mostly a requirement for integration with other old-style contracts which expect a strongly String based strategy.

    - ### Methods inherited from class org.apache.lucene.document.Field

      `binaryValue, boost, fieldType, name, numericValue, readerValue, setBoost, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, toString, translateFieldType`

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

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

- - ### Constructor Detail

    - #### ElasticsearchNullMarkerField

          public ElasticsearchNullMarkerField(String name,
                                              NullMarker nullMarker)

  - ### Method Detail

    - #### nullRepresentedAsString

          public String nullRepresentedAsString()

      Description copied from interface: `NullMarker`
      This is mostly a requirement for integration with other old-style contracts which expect a strongly String based strategy.
      Specified by:
        `nullRepresentedAsString` in interface `NullMarker`
      Returns:
        a string representation of the null-marker, or null if no marker is used.

    - #### nullEncoded

          public Object nullEncoded()

      Description copied from interface: `NullMarker`
      This returns the actual value to be indexed in place of null.

      The returned value may be:

      - A String, for text fields.
      - A Number, for numeric fields.
      Specified by:
        `nullEncoded` in interface `NullMarker`
      Returns:
        a representation of the null-marker ready to be indexed.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved