grapes-create-grapes: Create Elasticsearch index with custom mapping.

Description Usage Arguments See Also Examples

Description

Mappings are the closest concept to traditional database 'schema'. This function allows the creation of Elasticsearch indicies with custom mappings. If left unspecified, Elasticsearch will infer the type of each field based on the first document indexed.

Usage

1
rescource %create% mapping

Arguments

rescource

An elastic_rescource object that contains the information on the Elasticsearch cluster, index and document type, where the indexed data will reside. If this does not already exist, it will be created automatically.

mapping

A JSON object containing the mapping details required for the index.

See Also

https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html

Examples

1
2
3
4
## Not run: 
elastic("http://localhost:9200", "iris", "data") %create% mapping_default_simple()

## End(Not run)

AlexIoannides/elasticsearchr documentation built on July 31, 2019, 9:36 a.m.