all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Drew Adams <drew.adams@oracle.com>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Relevance search in Emacs
Date: Sun, 6 Dec 2020 00:26:12 +0300	[thread overview]
Message-ID: <X8v69AAK+WaGhIAr@protected.rcdrun.com> (raw)
In-Reply-To: <2bd19b32-1806-44ed-9c50-fe60bca90965@default>

* Drew Adams <drew.adams@oracle.com> [2020-12-06 00:07]:
> > Chapter 12. Full Text Search
> > https://www.postgresql.org/docs/current/textsearch-intro.html*TEXTSEARCH-MATCHING
> 
> That's apparently what's often called full-text search,
> and which is an indexed search.  The text is indexed
> ahead of time, and the index is used for search "lookup".

I am not using indexed method, just searching on the fly.

Relevance search could be simpler in Emacs just for strings.

This is example of an SQL query that gives results on the fly without
previous index and it searches only within hyperlink names and tags,
it is easy to add the body or text to it. It does not change visible
speed.

(format "SELECT DISTINCT hlinks_id, hlinks_name, hlinktypes_name,
actionstatuses_name FROM hlinks, hlinktypes, actionstatuses WHERE
(actionstatuses_id = hlinks_actionstatuses AND hlinks_hlinktypes =
hlinktypes_id) AND to_tsquery(%s) @@ to_tsvector(hlinks_name || ' ' ||
hlinks_tags) %s" query parent)

> > What is good is that database PostgreSQL offers built-in relevance
> > searches..  In the manual there is little I can find related to
> > "relevance".
> 
> Which manual?

Emacs manual. I have been expecting something similar in
completing-read or some other functions.

> > If somebody knows if there is some "relevance" search in Emacs built-in
> > packages let me know, otherwise I will let database do the job.
> 
> "Relevance" can mean anything.  Think of how much can go
> into, say, a google search: "relevance" there can include
> intimate detail about you as a person, your likes, etc.

What I mean is that words are closer to each other, for example that
term:

google intimate person

find your above quoted paragraph.

> Yes, some Emacs 3rd-party libraries do provide "scoring"
> of some kinds of searches.  For example, for certain kinds
> of fuzzy matching a score can indicate how "closely" a
> given candidate is matched by your search pattern.

Fuzzy matching could be good. Is there in Emacs similar? Not that I am
looking for outside libraries.




  reply	other threads:[~2020-12-05 21:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-05 18:18 Relevance search in Emacs Jean Louis
2020-12-05 21:06 ` Drew Adams
2020-12-05 21:26   ` Jean Louis [this message]
2020-12-05 21:43     ` Drew Adams
2020-12-05 22:22 ` TRS-80
2020-12-06  4:59   ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X8v69AAK+WaGhIAr@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.