You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mamlr/man/bulk_writer.Rd

33 lines
1.3 KiB

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bulk_writer.R
\name{bulk_writer}
\alias{bulk_writer}
\title{Generate a line-delimited JSON string for use in Elasticsearch bulk updates}
\usage{
bulk_writer(x, index = "maml", varname, type, ver)
}
\arguments{
\item{x}{A single-row data frame, or a string containing the variables and/or values that should be updated (a data frame is converted to a JSON object, strings are stored as-is)}
\item{index}{The name of the Elasticsearch index to update}
\item{varname}{String indicating the parent variable that should be updated (when it does not exist, it will be created, all varnames are prefixed by computerCodes)}
\item{type}{Type of updating to be done, can be either 'set', 'add', or 'addnested'}
\item{ver}{Short string (preferably a single word/sequence) indicating the version of the updated document (i.e. for a udpipe update this string might be 'udV2')}
}
\value{
A string usable as Elasticsearch bulk update command, in line-delimited JSON
}
\description{
Generate a line-delimited JSON string for use in Elasticsearch bulk updates
Type can be either one of three values:
set: set the value of [varname] to x
add: add x to the values of [varname]
varname: When using ud, the ud field will be updated instead of a computerCodes field
}
\examples{
bulk_writer(x, index = 'maml')
}