Description Usage Arguments Details Value Examples
Types are being removed from Elasticsearch. This little function aims to help remove "_type" fields from bulk newline-delimited JSON files. See Details.
1 |
file |
(character) a file path, required |
Looks for any lines that have an "index" key, then drops any "_type" keys in the hash given by the "index" key.
You can of course manually modify these files as an alternative, in a text editor or with command line tools like sed, etc.
a file path for a temporary file with the types removed
1 2 3 4 5 6 7 8 | ## Not run:
z <- system.file("examples/omdb.json", package = "elastic")
readLines(z, 6)
ff <- type_remover(z)
readLines(ff, 6)
unlink(ff)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.