<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.kai-mai.com">
<channel>
 <title>Kai Mai&#039;s Blog - Take Back the Web - Nodes for mongodb</title>
 <link>http://www.kai-mai.com/tags/mongodb</link>
 <description>Nodes containing the tag mongodb</description>
 <language>en</language>
<item>
 <title>Ruby MongoDB Geospatial Indexing Sample Codes</title>
 <link>http://www.kai-mai.com/node/189</link>
 <description>&lt;p&gt;
MongoDB has a &lt;a href=&quot;http://www.mongodb.org/display/DOCS/Geospatial+Indexing&quot;&gt;geospatial indexing&lt;/a&gt; feature that allows nearby search.  I was trying to get some sample codes running.  But the example codes doesn&#039;t work as &#039;ensureIndex&#039; doesn&#039;t seem to exist.  &lt;a href=&quot;http://codesnotdead.blogspot.com/2010/03/mongodb-geospatial-indexing-examples-in.html&quot;&gt;The Ruby sample codes&lt;/a&gt; don&#039;t work either as db.create_index&#039;s parameters seem to have changed.
&lt;/p&gt;
&lt;p&gt;
Peeking into &lt;a href=&quot;http://github.com/mongodb/mongo-ruby-driver/blob/367f9b32cca017e5f0e9fabdf2101f34918e5f2e/test/collection_test.rb&quot;&gt;the geospatial index test codes&lt;/a&gt; on the create_index method, it turned out that the first argument for create_index must be array of array for geospatial index(check out the documentation for &lt;a href=&quot;http://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/collection.rb&quot;&gt;the create_index method&lt;/a&gt;).
&lt;/p&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/396&quot;&gt;mongodb&lt;/a&gt; &lt;a href=&quot;tags/397&quot;&gt;database&lt;/a&gt; &lt;a href=&quot;tags/398&quot;&gt;geo&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">mongodb</category>
 <category domain="http://www.technorati.com/tag">database</category>
 <category domain="http://www.technorati.com/tag">geo</category>
 <pubDate>Sat, 10 Apr 2010 17:29:12 -0700</pubDate>
</item>
</channel>
</rss>

