Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 61096 invoked from network); 22 Mar 2008 00:19:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Mar 2008 00:19:34 -0000 Received: (qmail 72796 invoked by uid 500); 22 Mar 2008 00:19:32 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 72766 invoked by uid 500); 22 Mar 2008 00:19:32 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 72756 invoked by uid 99); 22 Mar 2008 00:19:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2008 17:19:32 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 72.14.220.154 as permitted sender) Received: from [72.14.220.154] (HELO fg-out-1718.google.com) (72.14.220.154) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Mar 2008 00:18:51 +0000 Received: by fg-out-1718.google.com with SMTP id 22so1541262fge.26 for ; Fri, 21 Mar 2008 17:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=QVvGCPYpcAtyRkBQkL3P25jYFdJoOSbLyRhW1nAGoMQ=; b=O450o11lzqIp2CDPpfWwAos/+QR1RN54laQyzjAp/yRX926F8tnhHwwWtfE5MBOXKyT0blg9UXYhbKEf3WiwjLDcT8kB58SkprYD2aUxESQlxyQsvNPho5qexS8jiOZRX/+9KUWEnYoVehkGBPK4fY7hnczdzopotU0Pml9uccw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=KQwpWWuwwbVnkOV2Qh4ZSLDzBY1tZcqurGVx0DCwH6CMrZVJ8n5lKCiS+aaoL3q3rHVsGvOj4S/wXrzJCcfCad6e3Gx5qtYghiWzrdGhqpFlnrje4jAMjT+FayImNGI3lG6SUjMw7NfkWeHmKjnrf3Jtc4njyJxXVcBHZLS+39s= Received: by 10.86.72.15 with SMTP id u15mr2247257fga.21.1206145141989; Fri, 21 Mar 2008 17:19:01 -0700 (PDT) Received: by 10.86.4.8 with HTTP; Fri, 21 Mar 2008 17:19:01 -0700 (PDT) Message-ID: Date: Fri, 21 Mar 2008 17:19:01 -0700 From: "Chris Anderson" Sender: jchris@gmail.com To: couchdb-user@incubator.apache.org Subject: Re: Sphinx integration (was: Working on Lucene) In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 1f68db51162a77bf X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Mar 21, 2008 at 3:26 PM, Jan Lehnardt wrote: > > We should come up with some "schema" (heh) that defines how > FT Indexers should behave. I am thinking of a special _design > document that sets various configuration variables for the indexer. > > E.g. the views to use for indexing: > > { > "_id":"_design/fulltextsearch", > "_rev":"123", > "_fulltext_options": { > "views": ["names", "cities"]; > } > } > > where names and cities were the names of two views. The Indexer > then could maintain two separate fulltext indexes based on these > views. The HTTP API for querying could look like this: > > http://server/database/_fulltext/names?query="+Me?er -Meyer" > > This is not meant as a definitive RFC, but a starting point for > discussions. Please chime in :) Jan, I like that idea. There's a use for returning the document that corresponds to each matching view row, but perhaps someone might want to use a view key as an index, and the view row's value as the return value. This could be useful as a lightweight way to return document summaries on a search results page, with links to the documents themselves (without sending the whole of every matching document to the client, when the query is made.) So some way to configure how to return the results would be handy. Here's a verbose crack at how one might configure it: { "_id":"_design/fulltextsearch", "_rev":"123", "_fulltext_options": { "views": { "names" : {"index":"view-value", "return":"document"}, "cities": {"index":"view-key", "return":"view-value"} } } } Chris -- Chris Anderson http://jchris.mfdz.com