Interface ElasticsearchIndexFieldTypeFactory

    • Method Detail

      • asNative

        ElasticsearchNativeIndexFieldTypeMappingStep asNative()
        Define a native field type.

        A native field type has the following characteristics:

        • Hibernate Search doesn't know its exact type, so it must be entirely defined as a JSON object, provided as the mappingJsonString parameter
        • When indexing, fields of this type must be populated with JSON. The field has a string type, but the string is interpreted as JSON, so it can contain a boolean, an integer, or even an object.
        • The predicate/sort/projection DSLs have only limited support for fields of this type. Some features may not work and throw an exception, such as phrase predicates. It is recommended to create the predicate/sort/projections targeting these fields from JSON using ElasticsearchSearchPredicateFactory.fromJson(String) or ElasticsearchSearchSortFactory.fromJson(String)
        A DSL step where the index field type can be defined in more details.