Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section E.3. Compound spatial indexes

E.3. Compound spatial indexes

It’s possible to create compound spatial indexes, but only if the coordinate key comes first. You might use a compound spatial index to enable queries on a location in addition to some type of metadata. For instance, imagine that the gardening store introduced earlier in the book has retail locations and that different locations provide different services. A couple of location documents might, in part, look like these:

{loc: [-74.2, 40.3], services: ['nursery', 'rentals']}
{loc: [-75.2, 39.3], services: ['rentals']}


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial