From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Indexed search with grep-like output Date: Sun, 02 Jan 2011 08:31:21 -0500 Message-ID: References: <831v4wpcue.fsf@gnu.org> <83wrmone2h.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1293975101 7450 80.91.229.12 (2 Jan 2011 13:31:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 2 Jan 2011 13:31:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 02 14:31:37 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZO23-0004QG-Of for ged-emacs-devel@m.gmane.org; Sun, 02 Jan 2011 14:31:35 +0100 Original-Received: from localhost ([127.0.0.1]:49515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZO23-0004ck-3e for ged-emacs-devel@m.gmane.org; Sun, 02 Jan 2011 08:31:35 -0500 Original-Received: from [140.186.70.92] (port=47546 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZO1u-0004bZ-N6 for emacs-devel@gnu.org; Sun, 02 Jan 2011 08:31:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZO1s-0006Vx-PE for emacs-devel@gnu.org; Sun, 02 Jan 2011 08:31:26 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:54263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZO1s-0006Vr-Mx for emacs-devel@gnu.org; Sun, 02 Jan 2011 08:31:24 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PZO1p-0004g7-4S; Sun, 02 Jan 2011 08:31:21 -0500 In-reply-to: (message from Lennart Borgman on Sun, 2 Jan 2011 12:40:10 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134159 Archived-At: > From: Lennart Borgman > Date: Sun, 2 Jan 2011 12:40:10 +0100 > Cc: emacs-devel@gnu.org > > On Sun, Jan 2, 2011 at 12:18 PM, Eli Zaretskii wrote: > >> From: Lennart Borgman > >> Date: Sun, 2 Jan 2011 05:12:32 +0100 > >> Cc: emacs-devel@gnu.org > >> > >> I do not know about other search engines, but at least Windows Desktop > >> Search allows you to restrict the search later. > > > > Because it's dog slow. > > Is it? Can you give an example? `lid' takes 0.1sec to return results of a query of a DB that indexes 12,800 source files of a large C++ software system. What's your timing of a comparable query with Windows Desktop? > I read that people have had good experience with Lucene and large > amounts of files. Have you tested Lucene? Yes, I use one of the tools that builds on Lucene (see http://www.methods.co.nz/docindexer/) to index MS Office documents (some 17,000 of them) I have on my office machine. It is also very fast: just a few seconds to return a query. > > `lid' is very fast, so if you don't want to > > index each tree separately, you can filter the output (which includes > > the full absolute file name) in Emacs, in the process filter that > > accepts `lid's output. > > Is not that slow since it requires a lot process switching? Not slower than grep or compilation -- if you want the results to be available to Emacs, and don't want to use synchronous subprocesses (so that you could continue working while it runs, and perhaps even lookup the first bunch of hits), you will always use this method. (I don't understand what you mean by "a lot of process switching" -- there are two processes running in parallel.)