Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD1E59A15 for ; Fri, 20 Jul 2012 17:16:14 +0000 (UTC) Received: (qmail 30300 invoked by uid 500); 20 Jul 2012 17:16:13 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 30276 invoked by uid 500); 20 Jul 2012 17:16:13 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 30266 invoked by uid 99); 20 Jul 2012 17:16:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2012 17:16:13 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.220.180] (HELO mail-vc0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2012 17:16:07 +0000 Received: by vcbfw7 with SMTP id fw7so3538186vcb.11 for ; Fri, 20 Jul 2012 10:15:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:content-type:x-gm-message-state; bh=taUAnkP/tS/gBp3m7y/gjJd/uVYFpHAAl2sxIPY8Fcg=; b=oR6PF6NRudyE8VFzzlnMA+xpX1+8WvLYSN4V6rLs/bdda288uTZnnhkXKVh2VQkgXW 1KBl8/zrEtZiG1GQ5H86/s7WqzIJHg1QHs9peotjaEbRE93sBpHUll4A2xqMaRXbIpIZ 5KHirKfK3KJ70sRpb9lwPpeDMEyznaMO5j1WsGA60qKwNzqKxh93EWUDRjD3HrFjbCrx oAezR8EmWExpiC4a8DEbp1I8LhcyyWlFP+RgtxNJ6AXl2/yOoGVlbQT8+27zmbihsRle s8JwFgkYaEF9dT9Ld4l3MWDx0pBcush31U1X6j9H+gsoA5C3GNpqsuT+d328YCQ1sUGh ppAQ== Received: by 10.52.176.170 with SMTP id cj10mr4573880vdc.31.1342804545704; Fri, 20 Jul 2012 10:15:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.186.163 with HTTP; Fri, 20 Jul 2012 10:15:25 -0700 (PDT) X-Originating-IP: [68.5.117.177] In-Reply-To: <5009181D.4060503@resourceandrevenue.com> References: <4C598FE8-7637-4863-8577-3B5C39A74042@apache.org> <5009181D.4060503@resourceandrevenue.com> From: Mark Hahn Date: Fri, 20 Jul 2012 10:15:25 -0700 Message-ID: Subject: Re: noob problem getting started with lucene To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=bcaec5186ae4f311d604c5460b8c X-Gm-Message-State: ALoCoQkY1HyI1cnJXxG7AvwLM3Va2Irw55hp6aQ81mPtWqziDbsZoe7s4VfCvhn3jf1EQxJ5veeg X-Virus-Checked: Checked by ClamAV on apache.org --bcaec5186ae4f311d604c5460b8c Content-Type: text/plain; charset=ISO-8859-1 My local.ini for couch looks like this. It shows up in the config page of futon. And the example that uses _fit works. [httpd_global_handlers] _fti = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985 ">>} curl http://root:xxx@localhost:**5984/_fti {"couchdb-lucene":"Welcome","**version":"0.9.0-SNAPSHOT"} curl http://root:xxx@localhost:5984/ri/_fti/_design/aaa/** name?q=The+Buddy+Group {"error":"not_found","reason":**"missing"} Doesn't the console output above show that couch.ini is setup and the proxy _fti is working? It is only the request that isn't working. On Fri, Jul 20, 2012 at 1:34 AM, Kai Griffin wrote: > Could be something not quite right in the relevant sections of your > local.ini? The two "contradictory" request formats you mentioned earlier > represent the old and the new way that couch handles external requests > (couchdb-lucene in this case). So, seeing that part of your local.ini > might help get to the bottom of it, hopefully... > > > > On 20/07/2012 01:22, Mark Hahn wrote: > >> Thanks so much for the help. >> >> What I showed was actually the contents of the design doc fulltext field >> as >> shown in futon. I should have said so. Here is the entire unadulterated >> source of the design doc. I think it is correct. >> >> { >> >> "_id": "_design/aaa", >> "_rev": "57-**31ea676b8139d4ef3a1a04d11fb952**e0", >> .... views and updates snipped .... >> "fulltext": { >> "name": { >> "index": "function (doc) { var ret; if (doc.name && >> !doc.closed && !doc._deleted) { ret = new Document(); >> ret.add(doc.name); log.info('hello lucene world'); return ret; } }" >> } >> } >> } >> >> >> I just noticed that my original post has a mistake. The second curl >> example showed the wrong response. Here it is again with the exact >> command >> I used (except for password). >> >> curl http://root:xxx@localhost >> :5984/ri/_fti/_design/aaa/**name?q=The+Buddy+Group >> {"error":"not_found","reason":**"missing"} >> >> When I googled this result I found this error in a lot of posts where the >> author had the _fti incorrectly set up in couch. But I think this console >> output proves that my _fti is correct. No? >> >> curl http://root:xxx@localhost:**5984/_fti >> {"couchdb-lucene":"Welcome","**version":"0.9.0-SNAPSHOT"} >> >> >> On Thu, Jul 19, 2012 at 3:26 PM, Robert Newson >> wrote: >> >> Your design document looks wrong to me (or you've omitted important parts >>> of it). Here's the one from the README for comparison; >>> >>> { >>> "_id":"_design/foo", >>> "fulltext": { >>> "by_subject": { >>> "index":"function(doc) { var ret=new Document(); >>> ret.add(doc.subject); return ret }" >>> }, >>> "by_content": { >>> "index":"function(doc) { var ret=new Document(); >>> ret.add(doc.content); return ret }" >>> } >>> } >>> } >>> >>> Note: the top-level key is called "fulltext", this is absent from your >>> design document. >>> >>> B. >>> >>> On 19 Jul 2012, at 19:25, Mark Hahn wrote: >>> >>> (I posted this as an issue on rnewson/couchdb-lucene and I moved it >>>> here) >>>> >>>> I cannot get a lucene query to work and need help. >>>> >>>> Lucene is running ok and the proxy from couchdb to lucene is working. >>>> >>>> curl http://127.0.0.1:5985 >>>> {"couchdb-lucene":"Welcome","**version":"0.9.0-SNAPSHOT"} >>>> >>>> curl http://root:tbgcomps2@**localhost:5984/_fti >>>> {"couchdb-lucene":"Welcome","**version":"0.9.0-SNAPSHOT"} >>>> >>>> My index view looks like this but the indexes directory is empty. When >>>> >>> is >>> >>>> Lucene supposed to create the index? On the first request? >>>> >>>> { >>>> name: { >>>> index: function (doc) { >>>> var ret; >>>> if (doc.name && !doc.closed && !doc._deleted) { >>>> ret = new Document(); >>>> ret.add(doc.name); >>>> return ret; >>>> } >>>> } >>>> } >>>> } >>>> >>>> I've tried both of these URLs. They are based on two different examples >>>> >>> in >>> >>>> the readme, which seem to be contradictory formats. >>>> >>>> Readme example: >>>> http://127.0.0.1:5984/_fti/**local/db1/_design/cl-test/idx?**q=hello >>>> >>>> curl >>>> http://localhost:5984/_fti/**local/mydb/_design/mydesign/** >>>> name?q=testname >>>> {"reason":"bad_request","code"**:500} >>>> >>>> Readme example: >>>> http://localhost:5984/**database/_fti/_design/foo/by_**subject?q=hello >>>> >>>> curl >>>> >>> http://localhost:5984/mydb/_**fti/_design/mydesign/name?q=**testname >>> >>>> {"reason":"bad_request","code"**:400} >>>> >>>> Can someone suggest what I might be doing wrong? >>>> >>> >>> > --bcaec5186ae4f311d604c5460b8c--