Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 58346 invoked from network); 4 Apr 2008 10:37:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2008 10:37:48 -0000 Received: (qmail 77765 invoked by uid 500); 4 Apr 2008 10:37:48 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 77660 invoked by uid 500); 4 Apr 2008 10:37:48 -0000 Mailing-List: contact couchdb-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-dev@incubator.apache.org Received: (qmail 77651 invoked by uid 99); 4 Apr 2008 10:37:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2008 03:37:48 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [195.41.46.235] (HELO pfepa.post.tele.dk) (195.41.46.235) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2008 10:37:03 +0000 Received: from pascal.widetrail.dk (0x503ed345.arcnxx11.adsl-dhcp.tele.dk [80.62.211.69]) by pfepa.post.tele.dk (Postfix) with ESMTP id 67A96FAC047 for ; Fri, 4 Apr 2008 12:36:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by pascal.widetrail.dk (Postfix) with ESMTP id 412AC361E1 for ; Fri, 4 Apr 2008 12:41:59 +0200 (CEST) Received: from pascal.widetrail.dk ([127.0.0.1]) by localhost (pascal.widetrail.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02104-06 for ; Fri, 4 Apr 2008 12:41:49 +0200 (CEST) Received: from www.widetrail.dk (localhost [127.0.0.1]) by pascal.widetrail.dk (Postfix) with ESMTP id F31AC3619A for ; Fri, 4 Apr 2008 12:41:48 +0200 (CEST) Received: from 193.3.142.123 (SquirrelMail authenticated user sh) by www.widetrail.dk with HTTP; Fri, 4 Apr 2008 12:41:48 +0200 (CEST) Message-ID: <60928.193.3.142.123.1207305708.squirrel@www.widetrail.dk> In-Reply-To: <510F433E-4823-4E22-893C-EAC3C711C580@apache.org> References: <15779D61-04DC-4E17-B4F7-7DB311BF2752@apache.org> <55247.193.3.142.123.1207296647.squirrel@www.widetrail.dk> <510F433E-4823-4E22-893C-EAC3C711C580@apache.org> Date: Fri, 4 Apr 2008 12:41:48 +0200 (CEST) Subject: Re: Fulltext HTTP API From: =?iso-8859-1?Q?S=F8ren_Hilmer?= To: couchdb-dev@incubator.apache.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: amavisd-new at widetrail.dk X-Virus-Checked: Checked by ClamAV on apache.org On Fri, April 4, 2008 11:55, Jan Lehnardt wrote: > On Apr 4, 2008, at 10:10, S�ren Hilmer wrote: >> Great!! >> >> In relation I am working on indexing using this algorithm: >> >> when database change notification is received >> 1. find document changed >> 2. for all views defined in the fulltext design document >> a. get view with startkey_docid= and >> count=1 >> b. if total_rows is 1 then re-index this view for this document >> >> Makes sense? > > Sounds sensible. Good > >> I guess I could save a lookup if a views query could be restricted >> based >> on document revision. > > Views always only contain the latest revision of a document. > Yes, but if I could restrict on revision I did not have to lookup the document id. Now I need to, 1) Get the database, I now have the revision. 2) Get the document with that revision, I now have document-id 3) get the view with startkey_docid=, count=1 If you could restrict on revision for views, step 2 could be eliminated, an step 3 would be: get the view with startkey_revision= > >> For searching I need to do something similar, as the best idea I >> have come >> up with is to still use the document id in the Lucene index, and >> then do >> the same starkey_docid,count=1 for the view, if the return value in >> the >> design document is specified to view. >> For this to make sense the search-api needs to be extended with the >> view >> you are searching, or do we want to always search all views defined >> in the >> designdoc? > > We'd extend the HTTP here, I guess. I reconned so. Have fun S�ren > > Cheers > Jan > -- > >> >> >> --S�ren >> >> -- >> S�ren Hilmer, M.Sc., M.Crypt. >> wideTrail Phone: +45 25481225 >> Pilev�nget 41 Email: sh@widetrail.dk >> DK-8961 Alling�bro Web: www.widetrail.dk >> >> On Thu, April 3, 2008 22:34, Jan Lehnardt wrote: >>> Heya, >>> >>> I decided to push forward the HTTP API for fulltext search. >>> >>> For the sake of KISS I only enabled database wide searching >>> with NO consideration of views within CouchDB. For now. >>> >>> You can now query http://couchdb/database? >>> and get a list of matching document ids and scores back >>> as shown in this screenshot: >>> >>> http://www.flickr.com/photos/janlehnardt/2385218843/ >>> >>> This is not the end of this development of course. We still >>> want to be able to use views to specify what to index and >>> we probably want that to be in CouchDB as per earlier >>> discussions. My focus here was getting out something >>> that works instead of empty promises. >>> >>> One more note: This is only available in the mochiweb >>> branch (that could use some developer attention *hint*, >>> there are only a handful of failing tests to fix). >>> >>> Cheers >>> Jan >>> -- >>> >> >> >> > > -- S�ren Hilmer, M.Sc., M.Crypt. wideTrail Phone: +45 25481225 Pilev�nget 41 Email: sh@widetrail.dk DK-8961 Alling�bro Web: www.widetrail.dk