Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id F23329FB1D6 for ; Tue, 27 Feb 2007 19:05:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 32614-10 for ; Tue, 27 Feb 2007 19:05:48 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by postgresql.org (Postfix) with ESMTP id 4CE389F9FB2 for ; Tue, 27 Feb 2007 19:05:48 -0400 (AST) Received: by py-out-1112.google.com with SMTP id a73so1111317pye for ; Tue, 27 Feb 2007 15:05:45 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=pkJbeP2IwRQD1D6Zg4X7Zmn3St9F8VkyCO2f8SqXpxvj5ffTqtge8t5upQ2U0NiT1CfgluhEtMB1eLg5DIHyIZWdtaBtrJzYhegv2/iSJi8GgEZKJv0n5XS8yOW10GSTcOnC27VME5ozFMNSlgdp9Di3FIw9gqZ88BWLWx9O+rE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=hUE8sEtTEmUb1x24J284N6FKOhnrvdDZ8PhMxr78xHeDo/MtRkYWKAyuFSTJdQBeKuMjTvpUYUGg20ErYNbbcFfs1lZm2JMffs5oX5aVAsGujunYkKwXjUc8q8hnbbCc5yeLL2mZhTmezvKNh0QTYUlaSvLzJorfLfeKurVs878= Received: by 10.35.50.5 with SMTP id c5mr15749099pyk.1172617545419; Tue, 27 Feb 2007 15:05:45 -0800 (PST) Received: from ?10.1.1.13? ( [203.217.18.65]) by mx.google.com with ESMTP id 34sm11075618nza.2007.02.27.15.05.43; Tue, 27 Feb 2007 15:05:44 -0800 (PST) Message-ID: <45E4B946.1060000@gmail.com> Date: Wed, 28 Feb 2007 10:05:42 +1100 From: Chris User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Madison Kelly CC: pgsql-performance@postgresql.org Subject: Re: Writting a "search engine" for a pgsql DB References: <45E30ADA.2050700@alteeve.com> In-Reply-To: <45E30ADA.2050700@alteeve.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/334 X-Sequence-Number: 23388 Madison Kelly wrote: > Hi all, > > I am asking in this list because, at the end of the day, this is a > performance question. > > I am looking at writing a search engine of sorts for my database. I > have only ever written very simple search engines before which amounted > to not much more that the query string being used with ILIKE on a pile > of columns. This was pretty rudimentary and didn't offer anything like > relevance sorting and such (I'd sort by result name, age or whatnot). > > So I am hoping some of you guys and gals might be able to point me > towards some resources or offer some tips or gotcha's before I get > started on this. I'd really like to come up with a more intelligent > search engine that doesn't take two minutes to return results. :) I > know, in the end good indexes and underlying hardware will be important, > but a sane as possible query structure helps to start with. As someone mentioned, tsearch2 is a good option. I wrote a small article about how to get it set up relatively easily: http://www.designmagick.com/article/27/ -- Postgresql & php tutorials http://www.designmagick.com/