help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Relevance search in Emacs


From: Jean Louis
Subject: Re: Relevance search in Emacs
Date: Sun, 6 Dec 2020 00:26:12 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* 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 via email to

[Prev in Thread] Current Thread [Next in Thread]