Package org.eclipse.rdf4j.sail.elasticsearch

## Class ElasticsearchDocument

- java.lang.Object
- - org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchDocument

- All Implemented Interfaces:
    `SearchDocument`

      public class ElasticsearchDocument
      extends Object
      implements SearchDocument

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ElasticsearchDocument​(String id, String type, String index, long seqNo, long primaryTerm, Map<String,​Object> fields, com.google.common.base.Function<? super String,​? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)` |
    `ElasticsearchDocument​(String id, String type, String index, long version, Map<String,​Object> fields, com.google.common.base.Function<? super String,​? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)` | Deprecated.
    `ElasticsearchDocument​(String id, String type, String index, String resourceId, String context, com.google.common.base.Function<? super String,​? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)` |
    `ElasticsearchDocument​(org.elasticsearch.search.SearchHit hit)` | Deprecated.
    `ElasticsearchDocument​(org.elasticsearch.search.SearchHit hit, com.google.common.base.Function<? super String,​? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addGeoProperty​(String name, String text)` |
    `void` | `addProperty​(String name)` | Adds/creates a new property with the given name.
    `void` | `addProperty​(String name, String text)` | Adds a value to the property with the given name.
    `String` | `getContext()` |
    `String` | `getId()` |
    `String` | `getIndex()` |
    `long` | `getPrimaryTerm()` |
    `List<String>` | `getProperty​(String name)` |
    `Set<String>` | `getPropertyNames()` | Returns a set of the property names.
    `String` | `getResource()` |
    `long` | `getSeqNo()` |
    `Map<String,​Object>` | `getSource()` |
    `String` | `getType()` |
    `long` | `getVersion()` | Deprecated.
    `boolean` | `hasProperty​(String name, String value)` | Checks whether a field occurs with a specified value in a Document.

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

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

- - ### Constructor Detail

    - #### ElasticsearchDocument

          @Deprecated
          public ElasticsearchDocument​(org.elasticsearch.search.SearchHit hit)

      Deprecated.

    - #### ElasticsearchDocument

          public ElasticsearchDocument​(org.elasticsearch.search.SearchHit hit,
                                       com.google.common.base.Function<? super String,​? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)

    - #### ElasticsearchDocument

          public ElasticsearchDocument​(String id,
                                       String type,
                                       String index,
                                       String resourceId,
                                       String context,
                                       com.google.common.base.Function<? super String,​? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)

    - #### ElasticsearchDocument

          @Deprecated
          public ElasticsearchDocument​(String id,
                                       String type,
                                       String index,
                                       long version,
                                       Map<String,​Object> fields,
                                       com.google.common.base.Function<? super String,​? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)

      Deprecated.

    - #### ElasticsearchDocument

          public ElasticsearchDocument​(String id,
                                       String type,
                                       String index,
                                       long seqNo,
                                       long primaryTerm,
                                       Map<String,​Object> fields,
                                       com.google.common.base.Function<? super String,​? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)

  - ### Method Detail

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `SearchDocument`

    - #### getType

          public String getType()

    - #### getVersion

          @Deprecated
          public long getVersion()

      Deprecated.

    - #### getSeqNo

          public long getSeqNo()

    - #### getPrimaryTerm

          public long getPrimaryTerm()

    - #### getIndex

          public String getIndex()

    - #### getSource

          public Map<String,​Object> getSource()

    - #### getResource

          public String getResource()

      Specified by:
        `getResource` in interface `SearchDocument`

    - #### getContext

          public String getContext()

      Specified by:
        `getContext` in interface `SearchDocument`

    - #### getPropertyNames

          public Set<String> getPropertyNames()

      Description copied from interface: `SearchDocument`
      Returns a set of the property names.
      Specified by:
        `getPropertyNames` in interface `SearchDocument`

    - #### addProperty

          public void addProperty​(String name)

      Description copied from interface: `SearchDocument`
      Adds/creates a new property with the given name.
      Specified by:
        `addProperty` in interface `SearchDocument`

    - #### addProperty

          public void addProperty​(String name,
                                  String text)

      Description copied from interface: `SearchDocument`
      Adds a value to the property with the given name.
      Specified by:
        `addProperty` in interface `SearchDocument`

    - #### addGeoProperty

          public void addGeoProperty​(String name,
                                     String text)

      Specified by:
        `addGeoProperty` in interface `SearchDocument`

    - #### hasProperty

          public boolean hasProperty​(String name,
                                     String value)

      Description copied from interface: `SearchDocument`
      Checks whether a field occurs with a specified value in a Document.
      Specified by:
        `hasProperty` in interface `SearchDocument`

    - #### getProperty

          public List<String> getProperty​(String name)

      Specified by:
        `getProperty` in interface `SearchDocument`