public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Wang YanQing <udknight@gmail.com>
To: Jean Delvare <jdelvare@suse.de>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michal Marek <mmarek@suse.cz>,
	Roland Eggner <edvx1@systemanalysen.net>
Subject: Re: [PATCH] kconfig: sort found symbols by relevance
Date: Tue, 7 May 2013 09:35:11 +0800	[thread overview]
Message-ID: <20130507013511.GA4769@udknight> (raw)
In-Reply-To: <1367854112.4569.137.camel@chaos.site>

On Mon, May 06, 2013 at 05:28:32PM +0200, Jean Delvare wrote:
> Le Monday 06 May 2013 à 15:02 +0200, Yann E. MORIN a écrit :
> > From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > 
> > When searching for symbols, return the symbols sorted by relevance.
> > 
> > Relevance is the ratio of the length of the matched string and the
> > length of the symbol name. Symbols of equal relevance are sorted
> > alphabetically.
> I did not look at the code, only tested it, and it does what I asked for
> originally: exact match is listed first. So thank you :)
> 
> However I am not sure if your implementation is what we want. Your
> definition of "relevance" is somewhat arbitrary and may not be
> immediately to others. For example, my own definition of "relevance" was
> that symbols which start with the subject string are more relevant than
> the symbols which have the string in the middle. Others would possibly
> have other definitions.

But no matter what the definition of relevance in text search, 
in the middle or start or end, the searcher always want the "results" 
look like what they input literal.

I think Yann's definition make sense. It is just a pattern matching ratio question.

If you want in start, just use ^PCI(reguar search), then with the help of 
this patch, will make people life easier.

This patch is not to replace the regular search, you can just use them together.

BTW, I haven't read the code right now, maybe I will read it tonight.
I test it, it works well, and I find it is useful to use it with regular search.

Thanks.

  parent reply	other threads:[~2013-05-07  1:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06  7:50 Wish: exact matches displayed first Jean Delvare
2013-05-06 10:00 ` Yann E. MORIN
2013-05-06 12:54   ` Yann E. MORIN
2013-05-06 13:04     ` Thomas Petazzoni
2013-05-06 13:53       ` Yann E. MORIN
2013-05-06 14:19         ` Jean Delvare
2013-05-06 14:27           ` Yann E. MORIN
2013-05-06 14:36             ` Jean Delvare
2013-05-06 14:10     ` Jean Delvare
2013-05-06 13:02 ` [PATCH] kconfig: sort found symbols by relevance Yann E. MORIN
2013-05-06 15:28   ` Jean Delvare
2013-05-06 18:17     ` Yann E. MORIN
2013-05-07  1:35     ` Wang YanQing [this message]
2013-05-06 18:20 ` Yann E. MORIN
2013-05-06 19:36   ` Yann E. MORIN
2013-05-06 21:15 ` [PATCH v3] " Yann E. MORIN
2013-05-09 15:27   ` Wang YanQing
2013-05-09 16:12     ` Yann E. MORIN
2013-05-10  0:51       ` Wang YanQing
2013-05-10 10:12         ` Yann E. MORIN

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=20130507013511.GA4769@udknight \
    --to=udknight@gmail.com \
    --cc=edvx1@systemanalysen.net \
    --cc=jdelvare@suse.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=yann.morin.1998@free.fr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox