From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0DYGFlh9x19QXwAA0tVLHw (envelope-from ) for ; Wed, 02 Dec 2020 11:41:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0D/eEVh9x19ICgAA1q6Kng (envelope-from ) for ; Wed, 02 Dec 2020 11:41:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id ECF7C9404DF for ; Wed, 2 Dec 2020 11:41:10 +0000 (UTC) Received: from localhost ([::1]:38538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkQVR-0002hI-3q for larch@yhetil.org; Wed, 02 Dec 2020 06:41:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkQUO-0002e8-B8 for emacs-orgmode@gnu.org; Wed, 02 Dec 2020 06:40:04 -0500 Received: from static.rcdrun.com ([95.85.24.50]:42991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkQUL-0007Nj-Ts for emacs-orgmode@gnu.org; Wed, 02 Dec 2020 06:40:04 -0500 Received: from localhost ([::ffff:197.157.0.57]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C0003.000000005FC77D0F.00006B67; Wed, 02 Dec 2020 11:39:56 +0000 Date: Wed, 2 Dec 2020 14:37:37 +0300 From: Jean Louis To: hpgisleropen@bluewin.ch Subject: Re: Remembrance Agents Message-ID: References: <875z5kvcsd.fsf@silverstone.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <875z5kvcsd.fsf@silverstone.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gerardomoro37@gmail.com, emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.28 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: ECF7C9404DF X-Spam-Score: -2.28 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: eQOgsY4fjM6c * hpgisleropen@bluewin.ch [2020-12-02 12:57]: > > The more information user > > enters into the database and the more tags and relations have been > > created the better the relevance. > > Isn't the real problem-to-solve finding the actual semantic context and > then to relate it matching information? That problem may easily be solved by using external tools such as PostgreSQL as it has a built-in relevance search and indexing functions. To index files into PostgreSQL database is not hard task. If you happen to have a need, let me know and I will help. Yesterday I have implemented relevance searć in relation to website pages in the database. As often I wish to reference URLs from my websites to our clients. Among 4000+ URLs one has to find it by thinking and not by browsing hierarchy. Until now I was using 2 inputs approach like: 1. Write one word or part of word that I remember being part of the page. 2. When faced with completion candidates narrow it down with second or third word. Yesterday I have implemented this search by using relevance matching feature and it works fast: (format "SELECT pages_id || ' ' || pages_title || ' ' || ts_rank_cd(to_tsvector(pages_title || pages_description),%s,32 /* rank/(rank+1) */) AS rank FROM pages, to_tsquery(%s) query WHERE query @@ to_tsvector(pages_title || pages_description) ORDER BY rank DESC LIMIT 30;" query query)) ;; TODO this cannot order by rank The query is prepared with this: (defun rcd-sql-prepare-text-query (query) (let* ((query (string-trim query)) (query (if (and (string-match " " query) (not (string-match "&" query))) (string-replace " " " & " query)))) query)) because I normally need WORD AND WORD. But I could make it any how, I could search for (WORD AND WORD) OR WORD OR (WORD AND WORD) all is possible. The function converts "my term words" into "my & term & words" where & has the meaning of logical AND. This shortens my search within Emacs to just one query and not having two steps. It finds relevant results with accuracy and precision. My searches locate the hyperlink within 10 first results, so I have limited it to 30 results. > There is als After all, words (TAGS, ...) have different meaning in > different semantic contexts. In their own meanings yes. But for the user's mind they may be related and useful to be searched together. If tag is there it is related to the object, search without tag and with tag may give quite different results. > I suspect, 'just' relating to tags (words) and showing the attached > document (part) to her is not very useful, yes? Thinking of many other systems, in many of other systems tags are main method of locating things. But it all comes from well organized user's mind. If mind is not organized user will not know how to tag to make future locating features work well. If it is tagged well locating things is very fast. - todo family son joe bicycle - todo family son kim drivers-license - todo business appointment - todo health kidneys When tags are used that way then locating things related to one son among two sons become easy. Locating things for family is larger group and locating business appointments becomes easy. When something is done, the TODO should be changed to something else. If user tags well then searches can be very useful. But what if user does not tag well but still has some attributes attached such as titles, body text, etc. then the relevance search may help. Chapter 12. Full Text Search https://www.postgresql.org/docs/current/textsearch-intro.html#TEXTSEARCH-MATCHING emacs-libpq @ Github https://github.com/anse1/emacs-libpq