[geary] Minor search doc updates.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Minor search doc updates.
- Date: Tue, 31 May 2016 07:51:46 +0000 (UTC)
commit 0b1f8cde627742a24beb262f138c6f8b19b925ca
Author: Michael James Gratton <mike vee net>
Date: Tue May 31 17:48:06 2016 +1000
Minor search doc updates.
src/engine/imap-db/imap-db-account.vala | 8 +++++---
.../imap-db/search/imap-db-search-query.vala | 11 ++++++++---
2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/src/engine/imap-db/imap-db-account.vala b/src/engine/imap-db/imap-db-account.vala
index 4bdc31a..af72b54 100644
--- a/src/engine/imap-db/imap-db-account.vala
+++ b/src/engine/imap-db/imap-db-account.vala
@@ -946,9 +946,11 @@ private class Geary.ImapDB.Account : BaseObject {
term = new SearchTerm(s, s, null, s.replace(":", " "), null);
} else {
string original = s;
-
- // some common search phrases we don't respect and therefore don't want to fall
- // through to search results
+
+ // Some common search phrases we don't respect and
+ // therefore don't want to fall through to search
+ // results
+ // XXX translate these
string lower = s.down();
switch (lower) {
case "":
diff --git a/src/engine/imap-db/search/imap-db-search-query.vala
b/src/engine/imap-db/search/imap-db-search-query.vala
index f9aeae7..9801576 100644
--- a/src/engine/imap-db/search/imap-db-search-query.vala
+++ b/src/engine/imap-db/search/imap-db-search-query.vala
@@ -53,12 +53,17 @@ private class Geary.ImapDB.SearchQuery : Geary.SearchQuery {
* Overridden by { link allow_stemming}. Determined by { link strategy}.
*/
public int max_difference_match_stem_lengths { get; private set; }
-
- // Not using a MultiMap because we (might) need a guarantee of order.
+
+ // Maps search operator field names such as "to", "cc", "is" to
+ // their search term values. Note that terms without an operator
+ // are stored with null as the key. Not using a MultiMap because
+ // we (might) need a guarantee of order.
private Gee.HashMap<string?, Gee.ArrayList<SearchTerm>> field_map
= new Gee.HashMap<string?, Gee.ArrayList<SearchTerm>>();
+
+ // A list of all search terms, regardless of search op field name
private Gee.ArrayList<SearchTerm> all = new Gee.ArrayList<SearchTerm>();
-
+
public SearchQuery(ImapDB.Account account, string query, Geary.SearchQuery.Strategy strategy) {
base (query, strategy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]