get_fields: Get the names and data types of the indexed fields in an...

Description Usage Arguments Value Examples

View source: R/get_fields.R

Description

For a given Elasticsearch index, return the mapping from field name to data type for all indexed fields.

Usage

1
get_fields(es_host, es_indices = "_all")

Arguments

es_host

A string identifying an Elasticsearch host. This should be of the form [transfer_protocol][hostname]:[port]. For example, 'http://myindex.thing.com:9200'.

es_indices

A character vector that contains the names of indices for which to get mappings. Default is '_all', which means get the mapping for all indices. Names of indices can be treated as regular expressions.

Value

A data.table containing four columns: index, type, field, and data_type

Examples

1
2
3
4
5
6
## Not run: 
# get the mapping for all indexed fields in the ticket_sales and customers indices
mappingDT <- get_fields(es_host = "http://es.custdb.mycompany.com:9200"
                              , es_indices = c("ticket_sales", "customers"))

## End(Not run)

uptasticsearch documentation built on Sept. 12, 2019, 1:04 a.m.