Elasticsearch Entities

MapR-DB binary tables are indexed in Elasticsearch indexes, which consist of types. Types in turn consist of JSON documents.

An index is the highest logical entity in Elasticsearch. It is equivalent to a database in traditional relational databases and to a group of related tables in MapR-DB. An Elasticsearch cluster can host multiple indexes.

An index contains one or more types. A type is equivalent to a table in traditional databases or in MapR-DB.

A type stores multiple JSON documents. Each row of a MapR-DB binary table that you are indexing corresponds to a JSON document in Elasticsearch. Consider the following example. Suppose that you are indexing the columns that are listed in the table below.

Column Family

Indexed Columns

personal

last_name

first_name

purchase

brand

item
price

review

text

rating

For each row of the table, there would be a JSON document in Elasticsearch with this structure:

{ 
personal : {
   first_name : value, 
   last_name : value 
   }, 
purchase : {
   brand : value, 
   item : value, 
   price : value 
   }, 
review : { 
   text : value, 
   rating : value
   } 
} 

This diagram summarizes how entities in Elasticsearch correspond to entities in MapR-DB: