The load command adds new records to the specified table.
Column values of existing records are updated by new values, if the table has a primary key and there are existing records with specified keys.
This is compatible to the load command of the Groonga.
(Document Root)/d/loadGET(Document Root)/d/loadPOSTvalues.values.Not supported.
Not supported.
{
"values" : <Array of records to be loaded>,
"table" : "<Name of the table>",
"columns" : "<List of column names for values, separated by ','>",
"ifexists" : "<Grn_expr to determine records which should be updated>",
"input_type" : "<Format type of the values>"
}
All parameters except table are optional.
On the version 1.0.7, only following parameters are available. Others are simply ignored because they are not implemented.
valuestablecolumnsThey are compatible to the parameters of the load command of the Groonga. See the linked document for more details.
HTTP clients can send values as an URL parameter with GET method, or the request body with POST method.
The URL parameter values is always ignored it it is sent with POST method.
You should send data with POST method if there is much data.
This returns an array meaning the result of the operation, as the body.
[
[
<Groonga's status code>,
<Start time>,
<Elapsed time>
],
[<Number of loaded records>]
]
This command always returns a response with 200 as its statusCode, because this is a Groonga compatible command and errors of this command must be handled in the way same to Groonga’s one.
Response body’s details:
0 (Droonga::GroongaHandler::Status::SUCCESS) : Successfully processed.-22 (Droonga::GroongaHandler::Status::INVALID_ARGUMENT) : There is any invalid argument.