{"id":8057,"date":"2020-01-16T20:49:10","date_gmt":"2020-01-17T04:49:10","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=8057"},"modified":"2023-05-25T03:34:06","modified_gmt":"2023-05-25T10:34:06","slug":"introducing-geo-bounded-polygon-query-in-full-text-search","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/","title":{"rendered":"Introducing Geo Bounded Polygon Query in Full Text Search"},"content":{"rendered":"<h2><b>Geo Bounded Polygon Query<\/b><\/h2>\n<p><span style=\"font-weight: 400\">The ability to perform text search with <a href=\"https:\/\/www.couchbase.com\/blog\/geospatial-basics-spatial-databases-and-nosql-examples\/\">geospatial query<\/a> capabilities is a very powerful and effective feature from full text search(FTS). And we are bringing the more flexible geo bounded polygon query feature to FTS in the upcoming releases. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Until now, FTS supports two types of geo queries. ie <a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/fts-geospatial-queries.html#creating_geospatial_rest_query_radius_based\">Point Distance queries<\/a> and <a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/fts-geospatial-queries.html#creating_geospatial_rest_query_bounding_box_based\">Bounded rectangle queries<\/a>.\u00a0<\/span><span style=\"font-weight: 400\">Point Distance query helps you in serving searches like &#8211; finding all points of interest near you <\/span><span style=\"font-weight: 400\">in their sorted order of distance, whereas the Bounded Rectangle query helps in finding all points of interest within the given rectangle boundary specified over the top_left and bottom_right corners.<\/span><\/p>\n<p><span style=\"font-weight: 400\">We know that in most real life use cases the geospatial boundaries come in all random shapes. ie they don\u2019t just show up like simple rectangular or square regions. Certainly, rectangles\/squares could be used as a first-hand approximation for the given spatial query. But for better precision results, we should be able to specify the region boundaries in a more granular way.<\/span><\/p>\n<p><span style=\"font-weight: 400\">And that leads to the introduction of geo bounded polygon queries in full text search.<\/span><\/p>\n<h2><strong>Essentials<\/strong><\/h2>\n<p><span style=\"font-weight: 400\">This feature adds the capability to perform a random bounding polygon query to select documents falling within that polygon area.\u00a0 Input parameters would be an array of coordinate pairs representing bounding polygon vertices that define the polygon area. (preferably in an anticlockwise direction). <\/span><span style=\"font-weight: 400\">Results should be a list of documents that lies within the area.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A few considerations for bounded polygon queries are:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The orientation of polygon coordinates is governed by the geoJSON standard. ref &#8211; <\/span><a href=\"https:\/\/tools.ietf.org\/html\/rfc7946#section-3.1.6\"><span style=\"font-weight: 400\">geojson<\/span><\/a><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Coordinates could be specified in a closed format (giving the last coordinate same as the first one) as well, but not necessary.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">It uses the ray casting technique for finding the point inclusivity in the polygon.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">No holes in the polygons are supported now. But there is a way users may perform such queries using boolean queries. (must_not clause for the inner polygons for querying shapes like donuts).<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The searchable geolocation field in the document needs to be indexed using the prebuilt \u201cgeopoint\u201d type.<\/span><\/li>\n<\/ul>\n<h2><strong>Modus Operandi<\/strong><\/h2>\n<p>Let&#8217;s quickly explore how easy it is to try out a bounded polygon query with FTS. It is just a 3 step process:<\/p>\n<ol>\n<li><span style=\"font-weight: 400\">Index the documents the same as we do for bounded rectangle\/point distance query.<\/span><\/li>\n<li><span style=\"font-weight: 400\">Identify a polygon area (vertices) you need to query within.<\/span><\/li>\n<li><span style=\"font-weight: 400\">Try the query in any of the geojson formats mentioned in the example below.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">For example, if you have a field named \u201cgeo\u201d in the document which contains the <a href=\"https:\/\/www.couchbase.com\/blog\/geospatial-basics-spatial-databases-and-nosql-examples\/\">geographic location<\/a> information, then first you need to include it in the index definition like below.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8058 aligncenter\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/01\/geo_index_defn-300x86.png\" alt=\"\" width=\"568\" height=\"163\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_index_defn-300x86.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_index_defn-1024x295.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_index_defn-768x221.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_index_defn-1536x442.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_index_defn-20x6.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_index_defn-1320x380.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_index_defn.png 1688w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/p>\n<p><span style=\"font-weight: 400\">Once the indexing is completed, you are ready to try your searches!<\/span><\/p>\n<p><span style=\"font-weight: 400\">Let&#8217;s say you are interested in finding documents within a given region.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-8059 aligncenter\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/01\/geo_sample-300x212.png\" alt=\"\" width=\"385\" height=\"272\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_sample-300x212.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_sample-768x542.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_sample-20x14.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/geo_sample.png 960w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/><\/p>\n<p><span style=\"font-weight: 400\">You may try the polygon queries like below.<\/span><\/p>\n<p>&#8220;`<\/p>\n<p><span style=\"color: #800000\"><em><span style=\"font-weight: 400\">curl -XPOST -H &#8220;Content-Type: application\/json&#8221;<br \/>\n-u &lt;username&gt;:&lt;password&gt; https:\/\/&lt;node&gt;:&lt;port&gt;\/api\/index\/&lt;indexName&gt;\/query -d &#8216;<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\">{<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0&#8220;query&#8221;: {<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0&#8220;field&#8221;: &#8220;geo&#8221;,<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0&#8220;polygon_points&#8221;: [<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0&#8220;37.79393211306212,-122.44234633404847&#8221;,<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0&#8220;37.77995881733997,-122.43977141339417&#8221;,<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0&#8220;37.788031092020155,-122.42925715405579&#8221;,<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0&#8220;37.79026946582319,-122.41149020154114&#8221;,<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0&#8220;37.79571192027403,-122.40735054016113&#8221;,<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0&#8220;37.79393211306212,-122.44234633404847&#8221;<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0]<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0}<\/span><\/em><\/span><br \/>\n<em><span style=\"font-weight: 400\"><span style=\"color: #800000\">}<\/span>&#8216;<\/span><\/em><\/p>\n<p>&#8220;`<\/p>\n<p><span style=\"font-weight: 400\">All the geo queries in FTS supports <a href=\"https:\/\/www.couchbase.com\/blog\/geospatial-basics-spatial-databases-and-nosql-examples\/\">geoJSON<\/a> formats and hence any of the below polygon coordinate formats can be used in addition to the above sample<\/span><\/p>\n<p><span style=\"font-weight: 400\">&#8220;`<\/span><\/p>\n<p><span style=\"color: #800000\"><em><span style=\"font-weight: 400\">&#8220;polygon_points&#8221;: [<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0{\u201clat\u201d: 37.79393211306212, \u201clon\u201d: -122.44234633404847},<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0 \u00a0 { \u201clat\u201d: 37.77995881733997, \u201clon\u201d: -122.43977141339417},<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0{ \u201clat\u201d: 37.788031092020155, \u201clon\u201d: -122.4292571540557},<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0{ \u201clat\u201d: 37.79026946582319,\u201clon\u201d: -122.41149020154114},<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0{ \u201clat\u201d: 37.79571192027403,\u201clon\u201d: -122.40735054016113},<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0{ \u201clat\u201d: 37.79393211306212, \u201clon\u201d: -122.44234633404847}<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0 ]<\/span><\/em><\/span><\/p>\n<p><code><\/code><\/p>\n<p>&#8220;`<\/p>\n<p>Or<\/p>\n<p>&#8220;`<\/p>\n<p><span style=\"color: #800000\"><em><span style=\"font-weight: 400\">&#8220;polygon_points&#8221;: [<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0[\u00a0 -122.44234633404847,\u00a0 37.79393211306212],<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0[\u00a0 -122.43977141339417, 37.77995881733997],<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0[ -122.42925715405579, 37.78803109202015],<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0[ -122.41149020154114, 37.79026946582319],<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0[ -122.40735054016113, 37.79571192027403],<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0[ -122.44234633404847,37.79393211306212]<\/span><\/em><\/span><br \/>\n<span style=\"color: #800000\"><em><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0]<\/span><\/em><\/span><\/p>\n<p>&#8220;`<\/p>\n<p>Or<\/p>\n<p><span style=\"font-weight: 400\">&#8220;`<\/span><\/p>\n<p><em><span style=\"font-weight: 400;color: #800000\">&#8220;polygon_points&#8221;: [\u201c9q8zjbkp\u201d, \u201c9q8yvvdh\u201d, \u201c9q8yyp1e\u201d, \u201c9q8yyrw8\u201d, \u201c9q8zn83x\u201d, \u201c9q8zjb0j\u201d]<\/span><\/em><\/p>\n<p>&#8220;`<\/p>\n<p>Eager to get your hands dirty with bounded polygon queries? Please pay heed to the upcoming Couchbase server releases.<\/p>\n<h2>Learn More<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/geospatial-basics-spatial-databases-and-nosql-examples\/\">What is a Spatial Database?<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/products\/full-text-search\/\">What is Full-Text Search?<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Geo Bounded Polygon Query The ability to perform text search with geospatial query capabilities is a very powerful and effective feature from full text search(FTS). And we are bringing the more flexible geo bounded polygon query feature to FTS in [&hellip;]<\/p>\n","protected":false},"author":26446,"featured_media":10932,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,1816,2165],"tags":[9187],"ppma_author":[9075],"class_list":["post-8057","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-couchbase-server","category-full-text-search","tag-spatial-data"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Introducing Geo Bounded Polygon Query in Full Text Search - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Introduction of geo bounded polygon query using couchbase full text search (fts), how to index and query documents with geo bounded polygon query\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing Geo Bounded Polygon Query in Full Text Search\" \/>\n<meta property=\"og:description\" content=\"Introduction of geo bounded polygon query using couchbase full text search (fts), how to index and query documents with geo bounded polygon query\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-17T04:49:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-25T10:34:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/01\/104-hero-map-geospatial.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1273\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sreekanth Sivasankaran\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreekanth Sivasankaran\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/\"},\"author\":{\"name\":\"Sreekanth Sivasankaran\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/7bbda3cf57beae8bd9cba686c0c6fe7a\"},\"headline\":\"Introducing Geo Bounded Polygon Query in Full Text Search\",\"datePublished\":\"2020-01-17T04:49:10+00:00\",\"dateModified\":\"2023-05-25T10:34:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/\"},\"wordCount\":630,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/104-hero-map-geospatial.jpg\",\"keywords\":[\"spatial data\"],\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Server\",\"Full-Text Search\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/\",\"name\":\"Introducing Geo Bounded Polygon Query in Full Text Search - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/104-hero-map-geospatial.jpg\",\"datePublished\":\"2020-01-17T04:49:10+00:00\",\"dateModified\":\"2023-05-25T10:34:06+00:00\",\"description\":\"Introduction of geo bounded polygon query using couchbase full text search (fts), how to index and query documents with geo bounded polygon query\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/104-hero-map-geospatial.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/104-hero-map-geospatial.jpg\",\"width\":1273,\"height\":628,\"caption\":\"Geospatial query polygons Couchbase NoSQL\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introducing Geo Bounded Polygon Query in Full Text Search\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/7bbda3cf57beae8bd9cba686c0c6fe7a\",\"name\":\"Sreekanth Sivasankaran\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/a60af16118050d1ea3a927388dc4dfb7\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g\",\"caption\":\"Sreekanth Sivasankaran\"},\"description\":\"Sreekanth Sivasankaran is a Principal Engineer\/Senior Engineering manager at Couchbase R&amp;D. He leads the design and development of distributed and highly performant Search functionality. And he has over 17 years of product development experience in various domains like telecom, handsets, enterprise software, big data technologies, and distributed systems.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/sreekanth-sivasankaran\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Introducing Geo Bounded Polygon Query in Full Text Search - The Couchbase Blog","description":"Introduction of geo bounded polygon query using couchbase full text search (fts), how to index and query documents with geo bounded polygon query","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/","og_locale":"en_US","og_type":"article","og_title":"Introducing Geo Bounded Polygon Query in Full Text Search","og_description":"Introduction of geo bounded polygon query using couchbase full text search (fts), how to index and query documents with geo bounded polygon query","og_url":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/","og_site_name":"The Couchbase Blog","article_published_time":"2020-01-17T04:49:10+00:00","article_modified_time":"2023-05-25T10:34:06+00:00","og_image":[{"width":1273,"height":628,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/01\/104-hero-map-geospatial.jpg","type":"image\/jpeg"}],"author":"Sreekanth Sivasankaran","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sreekanth Sivasankaran","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/"},"author":{"name":"Sreekanth Sivasankaran","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/7bbda3cf57beae8bd9cba686c0c6fe7a"},"headline":"Introducing Geo Bounded Polygon Query in Full Text Search","datePublished":"2020-01-17T04:49:10+00:00","dateModified":"2023-05-25T10:34:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/"},"wordCount":630,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/104-hero-map-geospatial.jpg","keywords":["spatial data"],"articleSection":["Best Practices and Tutorials","Couchbase Server","Full-Text Search"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/","url":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/","name":"Introducing Geo Bounded Polygon Query in Full Text Search - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/104-hero-map-geospatial.jpg","datePublished":"2020-01-17T04:49:10+00:00","dateModified":"2023-05-25T10:34:06+00:00","description":"Introduction of geo bounded polygon query using couchbase full text search (fts), how to index and query documents with geo bounded polygon query","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/104-hero-map-geospatial.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/01\/104-hero-map-geospatial.jpg","width":1273,"height":628,"caption":"Geospatial query polygons Couchbase NoSQL"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/introducing-geo-bounded-polygon-query-in-full-text-search\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Introducing Geo Bounded Polygon Query in Full Text Search"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/7bbda3cf57beae8bd9cba686c0c6fe7a","name":"Sreekanth Sivasankaran","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/a60af16118050d1ea3a927388dc4dfb7","url":"https:\/\/secure.gravatar.com\/avatar\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g","caption":"Sreekanth Sivasankaran"},"description":"Sreekanth Sivasankaran is a Principal Engineer\/Senior Engineering manager at Couchbase R&amp;D. He leads the design and development of distributed and highly performant Search functionality. And he has over 17 years of product development experience in various domains like telecom, handsets, enterprise software, big data technologies, and distributed systems.","url":"https:\/\/www.couchbase.com\/blog\/author\/sreekanth-sivasankaran\/"}]}},"authors":[{"term_id":9075,"user_id":26446,"is_guest":0,"slug":"sreekanth-sivasankaran","display_name":"Sreekanth Sivasankaran","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g","author_category":"","last_name":"Sivasankaran","first_name":"Sreekanth","job_title":"","user_url":"","description":"Sreekanth Sivasankaran is a Principal Engineer\/Senior Engineering Manager at Couchbase R&amp;D. He leads the design and development of distributed and highly performant Search functionality. And he has over 17 years of product development experience in various domains like telecom, handsets, enterprise software, big data technologies, and distributed systems."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/8057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/26446"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=8057"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/8057\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/10932"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=8057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=8057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=8057"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=8057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}