Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 87777 invoked from network); 18 Nov 2010 04:15:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Nov 2010 04:15:36 -0000 Received: (qmail 53491 invoked by uid 500); 18 Nov 2010 04:16:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 53213 invoked by uid 500); 18 Nov 2010 04:16:05 -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 53205 invoked by uid 99); 18 Nov 2010 04:16:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Nov 2010 04:16:05 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ziggythehamster@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-gw0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Nov 2010 04:15:58 +0000 Received: by gwj22 with SMTP id 22so1715522gwj.11 for ; Wed, 17 Nov 2010 20:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=RmLRkWYV9rUs6Fkr+Vt0omkXLPpwLOKFlNb/B7gRNtY=; b=nWSxVr8ZeNJ+CYufaWKAlXsHDKJNjQj6e2GubpaY2cW/afs/30USW5IIi98fQA8iVD FrjE6fUuO/nF2vL15eEgoIvQG54M7l/yPss7ePlDGl5/oFT6Vi4Tb3AeDcrQV2Xz3imU zphRy5TbFOVoVnkuKxMa4thcclZb5KRTn8K6E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=ADSrCN6ZcIO4xv2HnWxngpbO7dK82qFcV6N5rNgPNO6gjKZlAp6tZUYizCUy4Dt+Nu cwRYUxSGqIOW9v8vpdJstpcT0JKz27AKkHMqXG8c0wnKD7fJrG4g1dwKMdA6fH3YkYUb dt5GZP/ybqI+o07g9Koe5p1hQJhmZ7+634WcI= Received: by 10.100.174.17 with SMTP id w17mr89842ane.15.1290053737468; Wed, 17 Nov 2010 20:15:37 -0800 (PST) Received: from [172.16.0.10] (ip68-0-73-133.tu.ok.cox.net [68.0.73.133]) by mx.google.com with ESMTPS id t23sm7194764ano.7.2010.11.17.20.15.36 (version=SSLv3 cipher=RC4-MD5); Wed, 17 Nov 2010 20:15:36 -0800 (PST) Subject: GeoCouch weird issue / won't index From: Keith Gable To: "user@couchdb.apache.org" Content-Type: text/plain; charset="us-ascii" Date: Wed, 17 Nov 2010 22:15:18 -0600 Message-ID: <1290053718.3368.14.camel@keith> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit I'm trying out GeoCouch right now and I'm coming across something I've been banging my head on for an hour or two now. I got the examples to work, but I can't get anything to actually work with my real data. Here is my spatial function (which is design_doc["spatial"]["geocode"] in case I have it in the wrong spot, but it DOES run, so I doubt this): function(doc) { if (doc['couchrest-type'] == 'Place') { if (doc['geo'] && doc['geo'].length == 2) { log('geo on ' + doc['_id'] + ' = ' + doc['geo'][0] + ',' + doc['geo'][1] ); emit({ type: "Point", coordinates: [ doc['geo'][0], doc['geo'][1] ] }, doc['_id']); } else { log('no geo on ' + doc['_id']); } } } Here is one of the documents: { "_id": "000c02eb-3372-4071-b56d-928f154a3357", "_rev": "4-5a1c3fe5d45fd164c6dc4216672d3f58", "address": "710 E Ben White Blvd", "title": "McDonald's", "alcohol": [ ], "postal_code": "78704", "url": "www.mcdonalds.com", "human_id": null, "fare": [ "Fast Food", "American", "Burgers" ], "created_by": "_system", "tags": [ ], "bitly_hash": null, "atmosphere": null, "parking": null, "geo": [ 30.218978, -97.75523 ], "phone_number": "(512) 707-6838", "couchrest-type": "Place", "reservations": null, "credit_cards_accepted": [ ], "features": [ "Kid Friendly" ], "updated_by": "_system", "path": [ "875de01b-edb9-47a4-aabc-7acd97ecde43", "ea46e21f-889c-4960-b0eb-3cf65a093a1c", "bfff92eb-d35c-4df3-ae8f-01e68c3f8fc6", "6a26a5fd-34ef-47de-9d0e-7c4bce509b1b", "000c02eb-3372-4071-b56d-928f154a3357" ], "hours": null, "description": null, "owned_by": "_system" } The correct coordinates get outputted by my log() functions, but it seems like nothing gets emitted. This spatial query returns nothing: http://localhost:5984/macrodeck-development/_design/Place/_spatial/geocode?bbox=0,0,180,90 The log isn't really entirely helpful either since it doesn't seem to tell me if there was a problem with the GeoJSON. I'm running version "1.1.0a771dd47-git" (latest version as of a few minutes ago). Any tips to help diagnose this? Maybe I've just made a stupid mistake and it's going to be a simple fix... :) Thanks for any help anyone can provide.