org.hibernate.search.engine.nulls.codec.impl

## Interface NullMarkerCodec

- All Known Implementing Classes:
    ElasticsearchAsNullNullMarkerCodec, ElasticsearchAsNullStringNullMarkerCodec, ElasticsearchAsTokenStringNullMarkerCodec, ElasticsearchBooleanNullMarkerCodec, ElasticsearchDoubleNullMarkerCodec, ElasticsearchFloatNullMarkerCodec, ElasticsearchIntegerNullMarkerCodec, ElasticsearchLongNullMarkerCodec, LuceneDoubleNullMarkerCodec, LuceneFloatNullMarkerCodec, LuceneIntegerNullMarkerCodec, LuceneLongNullMarkerCodec, LuceneStringNullMarkerCodec, NotEncodingCodec

      public interface NullMarkerCodec

  Contract to manage coding and decoding (querying) of null values. Null values can be stored as special markers or skipping the field altogether. When encoding a marker the index field type shall match the other fields, as field types often need to be consistent across the whole index. Also the strategy to find a match for such a null-encoded value might vary.
  Author:
    Sanne Grinovero

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Query` | `createNullMatchingQuery(String fieldName)` Create a Query to find all documents which have a 'null' value encoded in the specified field
    `void` | `encodeNullValue(String fieldName, Document document, LuceneOptions luceneOptions)` Store the null marker in the Document.
    `NullMarker` | `getNullMarker()`
    `boolean` | `representsNullValue(IndexableField field)` Check if the field represents the encoding for a null element

- - ### Method Detail

    - #### getNullMarker

          NullMarker getNullMarker()

      Returns:
        The null marker used by this codec.

    - #### encodeNullValue

          void encodeNullValue(String fieldName,
                               Document document,
                               LuceneOptions luceneOptions)

      Store the null marker in the Document. Some implementations might not do anything
      Parameters:
        `fieldName` - the name of the field
        `document` - the document where to store the null marker
        `luceneOptions` - indexing options

    - #### representsNullValue

          boolean representsNullValue(IndexableField field)

      Check if the field represents the encoding for a null element
      Parameters:
        `field` - the fields to check
      Returns:
        true if the field argument is representing the encoding for a null element.

    - #### createNullMatchingQuery

          Query createNullMatchingQuery(String fieldName)

      Create a Query to find all documents which have a 'null' value encoded in the specified field
      Parameters:
        `fieldName` - the field to target with the Query
      Returns:
        a new Lucene Query

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