Class ElasticsearchDocument

java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
org.opencastproject.elasticsearch.impl.ElasticsearchDocument
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public final class ElasticsearchDocument extends HashMap<String,Object>
Document that encapsulates business objects and offers support for adding those objects to a search index.
See Also:
  • Constructor Details

    • ElasticsearchDocument

      public ElasticsearchDocument(String id, String type, List<org.opencastproject.elasticsearch.api.SearchMetadata<?>> resource)
      Creates a new elastic search document based on the id, the document type and the metadata.

      Note that the type needs to map to an Elasticsearch document type mapping.

      Parameters:
      id - the resource identifier.
      type - the document type
      resource - the resource metadata
  • Method Details

    • getType

      public String getType()
      Returns the document type.
      Returns:
      the type
    • getUID

      public String getUID()
      Returns the identifier.
      Returns:
      the identifier