query-threads/results: cosmetics

This commit is contained in:
Dirk-Jan C. Binnema
2022-06-09 00:38:34 +03:00
parent 49b97e1b6b
commit d38d32c404
2 changed files with 8 additions and 7 deletions

View File

@ -267,18 +267,19 @@ public:
} }
/** /**
* Get the date for the document (message) the iterator is pointing at. * Get the a sortable date str for the document (message) the iterator
* pointing at, or Nothing. * is pointing at. pointing at, or Nothing. This (encoded) string
* has the same sort-order as the corresponding date.
* *
* @return a filesystem path * @return a filesystem path
*/ */
Option<std::string> date() const noexcept { Option<std::string> date_str() const noexcept {
return opt_string(Field::Id::Date); return opt_string(Field::Id::Date);
} }
/** /**
* Get the file-system path for the document (message) this iterator is * Get the subject for the document (message) this iterator is pointing
* pointing at. * at.
* *
* @return the subject * @return the subject
*/ */

View File

@ -186,7 +186,7 @@ determine_id_table(QueryResultsType& qres)
// order, still sort the thread levels below that in ascending // order, still sort the thread levels below that in ascending
// order. // order.
container.thread_date_key = container.query_match->date_key = container.thread_date_key = container.query_match->date_key =
mi.date().value_or(""); mi.date_str().value_or("");
// initial guess for the thread-date; might be updated // initial guess for the thread-date; might be updated
// later. // later.
@ -618,7 +618,7 @@ struct MockQueryResult {
} }
Option<std::string> message_id() const { return message_id_; } Option<std::string> message_id() const { return message_id_; }
Option<std::string> path() const { return path_; } Option<std::string> path() const { return path_; }
Option<std::string> date() const { return date_; } Option<std::string> date_str() const { return date_; }
Option<std::string> subject() const { return subject_; } Option<std::string> subject() const { return subject_; }
QueryMatch& query_match() { return query_match_; } QueryMatch& query_match() { return query_match_; }
const QueryMatch& query_match() const { return query_match_; } const QueryMatch& query_match() const { return query_match_; }