store/server: centralize docids-for-msgid

No need for two near-identical impls

Remove some dead declarations.
This commit is contained in:
Dirk-Jan C. Binnema
2023-07-09 23:20:32 +03:00
parent 0b4f7c4cbe
commit 18490a818d
4 changed files with 45 additions and 57 deletions

View File

@ -271,6 +271,18 @@ public:
*/
Option<Message> find_message(Id id) const;
using IdVec = std::vector<Id>;
/**
* Get the doc-ids for messages with the given message-id
*
* @param msg_id a message id
* @param max_results maximum number of results
*
* @return either an Error or a vector of docids
*/
Result<IdVec> find_docids_with_message_id(const std::string& msg_id) const;
/**
* does a certain message exist in the store already?
*
@ -353,24 +365,6 @@ public:
*/
size_t for_each_term(Field::Id id, ForEachTermFunc func) const;
/**
* Get the store metadata for @p key
*
* @param key the metadata key
*
* @return the metadata value or empty for none.
*/
std::string metadata(const std::string& key) const;
/**
* Write metadata to the store.
*
* @param key key
* @param val value
*/
void set_metadata(const std::string& key, const std::string& val);
/**
* Get the timestamp for some message, or 0 if not found
*