From d1518d22a44ea2a3b8cb2ca3777e0ef1e1f0c4a2 Mon Sep 17 00:00:00 2001 From: Martyn Welch <martyn.welch@collabora.com> Date: Wed, 24 Jun 2020 15:28:43 +0100 Subject: [PATCH] Remove contact search doc The search mechanism documented here currently doesn't work: user@apertis:~$ folks-inspect search foo (folks-inspect:13376): folks-WARNING **: 01:48:07.385: backend-store.vala:434: Error preparing Backend 'telepathy': The name org.freedesktop.Telepathy.AccountManager was not provided by any .service files This functionality is currently not a priority, drop the documentation since it doesn't work. Signed-off-by: Martyn Welch <martyn.welch@collabora.com> --- content/docs/contacts-search.md | 77 --------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 content/docs/contacts-search.md diff --git a/content/docs/contacts-search.md b/content/docs/contacts-search.md deleted file mode 100644 index 78d0e3454..000000000 --- a/content/docs/contacts-search.md +++ /dev/null @@ -1,77 +0,0 @@ -+++ -date = "2014-12-17" -weight = 100 - -title = "Contacts Search" - -aliases = [ - "/old-wiki/Docs/contacts-search" -] -+++ - -# Contacts search - -This allows to search for fields of contacts, and to get the results of -the search sorted by full name if desired. - -## Basic explanation - - - **Query** contains basic definitions (constants, etc.) - - **SimpleQuery** contains the search definitions (the query token and - fields to match) - - **SearchView** provides the means to retrieve the search results - (using the query defined in SimpleQuery) - - **individuals** returns a Map with the unsorted map of - \<Individual.id, Individual\> returned by the search - - **sorted_individuals** returns a sorted List of Individuals - - For a paged, sorted list, call **get_sorted_page(int - page_size, int page_num)** - -## Folks-inspect option - -A basic search option has been added to folks-inspect. It will search -the name fields of contacts and output the matching contacts. - -Usage: - -`folks-inspect search [string]` - -## Example - -Here is a basic example, extracted from folks-inspect tool - -` using Folks;` -` using Gee;` -` using GLib;` -` private class Folks.Inspect.Commands.Search : Folks.Inspect.Command` -` {` -`   public Search (Client client)` -`     {` -`       base (client);` -`     }` -` ` -`   public override async void run (string? command_string)` -`     {` -`       if (command_string == null)` -`         {` -`           /* A search string is required */` -`           Utils.print_line ("Please enter a search string");` -`         }` -`       else` -`         {` -`           var query = new SimpleQuery (` -`             command_string, Query.MATCH_FIELDS_NAMES);` -`           var search_view = new SearchView (this.client.aggregator, query);` -`           try` -`           {` -`             yield search_view.prepare ();` -`           }` -`           catch (GLib.Error e)` -`           {` -`             GLib.warning ("Error when calling prepare: %s\n", e.message);` -`           }     ` -`           foreach (var individual in search_view.individuals.values)` -`             Utils.print_individual (individual, true);` -`         }` -`     }` -` }` -- GitLab