Company
Date Published
Author
Peter Reale
Word count
2097
Language
English
Hacker News points
None

Summary

The text discusses leveraging Couchbase's full-text search engine with geospatial capabilities. It begins by explaining how one can use a series of vertices defining an irregular polygon to query data associated with points inside or outside the perimeter. The author then introduces the concept of U.S. Congressional districts, which often require thousands of pairs of latitude and longitude points to define them, making it a suitable example for demonstrating Couchbase's geospatial search capabilities. The text goes on to describe how these polygons can be used to retrieve data from a database, specifically by storing and retrieving geo-points in the form of an embedded array within a JSON document. It then explains how to build an index using FTS and N1QL, allowing for queries against specific polygonal regions. The author demonstrates this with a series of examples, including a simple search, conjunct searches, and the use of Common Table Expressions (CTEs) to reference arrays containing geopoints.