structure that holds attribute names and their values in documents to be updated More...
#include <sphinxclient.h>
Public Member Functions | |
AttributeUpdates_t () | |
constructor, default command version is VER_COMMAND_UPDATE_0_9_8 | |
void | setAttributeList (const std::vector< std::string > &attr=std::vector< std::string >()) |
sets attribute list, clears value list | |
void | addAttribute (const std::string &) |
adds attribute to attribute list, clears value list | |
void | addDocument (uint64_t id, const std::vector< Value_t > &vals) |
Add document to update attributes at and their values in vector. | |
void | addDocument (uint64_t id, ValueType_t t,...) |
Add a document to update attributes at and their values if type t in variable-length argument list. Doesn't check the argument count. | |
void | setCommandVersion (UpdateCommandVersion_t v) |
set update command version | |
Data Fields | |
UpdateCommandVersion_t | commandVersion |
std::vector< std::string > | attributes |
std::map< uint64_t, std::vector< Value_t > > | values |
structure that holds attribute names and their values in documents to be updated
void Sphinx::AttributeUpdates_t::addDocument | ( | uint64_t | id, | |
ValueType_t | t, | |||
... | ||||
) |
Add a document to update attributes at and their values if type t in variable-length argument list. Doesn't check the argument count.
id | document id | |
t | type of following arguments (uint32_t and float supported) | |
... | argument values of previously defined type |
void Sphinx::AttributeUpdates_t::addDocument | ( | uint64_t | id, | |
const std::vector< Value_t > & | vals | |||
) |
Add document to update attributes at and their values in vector.
id | document id | |
vals | vector of attribute values, size must match attribute count |
ClientUsageError_t | when attribute count doesn't match value count |