Expose text match score as "text_match".

This commit is contained in:
kishorenc 2020-04-09 07:06:12 +05:30
parent 559ee3369a
commit 0055a687a7
2 changed files with 2 additions and 2 deletions

View File

@ -784,7 +784,7 @@ Option<nlohmann::json> Collection::search(const std::string & query, const std::
prune_document(document, include_fields, exclude_fields);
wrapper_doc["document"] = document;
wrapper_doc["match_score"] = field_order_kv.match_score;
wrapper_doc["text_match"] = field_order_kv.match_score;
//wrapper_doc["seq_id"] = (uint32_t) field_order_kv.key;
result["hits"].push_back(wrapper_doc);

View File

@ -108,7 +108,7 @@ void init_cmdline_options(cmdline::parser & options, int argc, char **argv) {
options.add<std::string>("peering-address", '\0', "Internal IP address to which Typesense peering service binds.", false, "");
options.add<uint32_t>("peering-port", '\0', "Port on which Typesense peering service listens.", false, 8107);
options.add<std::string>("peers", '\0', "Path to file with comma separated string of peer node IPs.", false);
options.add<std::string>("peers", '\0', "Path to file containing comma separated string of all nodes in the cluster.", false);
options.add<std::string>("ssl-certificate", 'c', "Path to the SSL certificate file.", false, "");
options.add<std::string>("ssl-certificate-key", 'k', "Path to the SSL certificate key file.", false, "");