class ElasticAdapter::DocumentType

This class is intended to hold information about a document in an elasticsearch index

@see www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping.html Elasticsearch Mappings

@example

document_type = ElasticAdatper::DocumentType.new("test_doc", {
  test_doc: {
    properties: {
      name: {
        type: "string"
      }
    }
  }
})

@attr_reader [String] name the name of the document @attr_reader [Hash] mappings the mappings for the document

Attributes

mappings[R]
name[R]

Public Class Methods

new(name, mappings) click to toggle source

@param [String] name @param [Hash] mappings

# File lib/elastic_adapter/document_type.rb, line 26
def initialize(name, mappings)
  @name = name
  @mappings = mappings
end