{"id":9099,"date":"2020-08-12T11:11:35","date_gmt":"2020-08-12T18:11:35","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=9099"},"modified":"2023-05-24T05:55:33","modified_gmt":"2023-05-24T12:55:33","slug":"fts-flex-indexes-in-couchbase-server-6-6","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/","title":{"rendered":"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6"},"content":{"rendered":"<p><span data-preserver-spaces=\"true\">In this article, we will touch on some practical examples starting with N1QL queries using\u00a0<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs.couchbase.com\/server\/5.0\/architecture\/global-secondary-indexes.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">GSI Indexes<\/span><\/a><span data-preserver-spaces=\"true\">\u00a0and simulate a dataset that over time grows not just with document size, but the actual document structure growing as well. Couchbase Server makes flexible schema easy, but when new fields and data are added we need to add more GSI indexes and potentially maintain them.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">I&#8217;d recommend reading through our\u00a0<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs.couchbase.com\/server\/6.6\/n1ql\/n1ql-language-reference\/flex-indexes.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">Flex Indexes<\/span><\/a><span data-preserver-spaces=\"true\">\u00a0docs after this article if you have not, however; this blog post will cover some practical examples to get you familiar with using Flex Indexes.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Starting in Couchbase 6.5 (early preview) and now with more support in the<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs.couchbase.com\/server\/current\/introduction\/whats-new.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0Couchbase 6.6 release<\/span><\/a><span data-preserver-spaces=\"true\">, we have the ability to leverage Flex Indexes. It&#8217;s a great tool to use in cases where conditions are not predetermined and your search predicates involve a large number of fields. We will target those situations. We use the travel-sample bucket in order to ensure you can get up and running and follow along easily.<\/span><\/p>\n<h2>Preparing Our Server &amp; Data<\/h2>\n<p><span data-preserver-spaces=\"true\">To get started I have<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs.couchbase.com\/server\/current\/install\/getting-started-docker.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0installed Couchbase Server 6.6 using Docker<\/span><\/a><span data-preserver-spaces=\"true\">, but feel free to install\u00a0<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs.couchbase.com\/server\/current\/install\/install-intro.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">locally<\/span><\/a><span data-preserver-spaces=\"true\">, on<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/www.couchbase.com\/products\/cloud\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0Couchbase Cloud<\/span><\/a><span data-preserver-spaces=\"true\">, or<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs.couchbase.com\/server\/current\/cloud\/couchbase-cloud-deployment.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0on your favorite cloud platform<\/span><\/a><span data-preserver-spaces=\"true\">\u00a0if you wish.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Once our Couchbase Server is up and running,<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs.couchbase.com\/server\/current\/manage\/manage-settings\/install-sample-buckets.html#install-sample-buckets-with-the-ui\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0install the travel-sample sample bucket<\/span><\/a><span data-preserver-spaces=\"true\">. You should now see 31,631 documents available.<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/travel-sample_documents.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9216\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/travel-sample_documents.png\" alt=\"travel-sample data oveview\" width=\"1740\" height=\"682\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_documents.png 1740w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_documents-300x118.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_documents-1024x401.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_documents-768x301.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_documents-1536x602.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_documents-20x8.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_documents-1320x517.png 1320w\" sizes=\"auto, (max-width: 1740px) 100vw, 1740px\" \/><\/a><\/p>\n<p>Installed also are the default primary and GSI indexes to help you query this dataset right out of the box.<\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/travel-sample_indexes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9217\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/travel-sample_indexes.png\" alt=\"travel-sample indexes\" width=\"1740\" height=\"831\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_indexes.png 1740w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_indexes-300x143.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_indexes-1024x489.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_indexes-768x367.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_indexes-1536x734.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_indexes-20x10.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_indexes-1320x630.png 1320w\" sizes=\"auto, (max-width: 1740px) 100vw, 1740px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">For the queries that we will be running against the hotel data, we will only be using three of the indexes we see installed on the Indexes tab.<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">def_city<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">def_primary<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">def_type<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>This should leave us with three indexes and we could assume that if our only intention was to query hotel records, these would suffice for our queries around the existing data from the travel-sample data set. <span style=\"font-weight: 400\">Considering our <strong>&#8220;hotel&#8221;<\/strong> type documents, these three indexes will be the ones we use in our examples.<\/span><\/p>\n<h2>Basic GSI Indexes<\/h2>\n<p>We will start by looking at an N1QL query <strong>WITHOUT<\/strong> Flex Indexing.<\/p>\n<pre><code class=\"language-SQL\">SELECT * FROM `travel-sample`\r\nWHERE type = \"hotel\" \r\n  AND country = \"United States\" \r\n  AND state = \"California\"\r\n  AND (city = \"Fremont\" OR city = \"Oakland\")<\/code><\/pre>\n<p><span style=\"font-weight: 400\">When we run this N1QL query using the prebuilt GSI indexes that come with the <strong>travel-sample<\/strong> dataset we end up using an intersect of the <\/span><b>def_type<\/b><span style=\"font-weight: 400\"> and\u00a0 <\/span><b>def_city<\/b><span style=\"font-weight: 400\"> GSI indexes.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In the Couchbase Server Web UI, <\/span><span style=\"font-weight: 400\">Execute the Query in the Query Workbench editor and review the Plan to see which Index is being used.<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/travel-sample_gsi-index.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9218\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/travel-sample_gsi-index.png\" alt=\"\" width=\"1790\" height=\"1241\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_gsi-index.png 1790w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_gsi-index-300x208.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_gsi-index-1024x710.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_gsi-index-768x532.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_gsi-index-1536x1065.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_gsi-index-20x14.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/travel-sample_gsi-index-1320x915.png 1320w\" sizes=\"auto, (max-width: 1790px) 100vw, 1790px\" \/><\/a><\/p>\n<p><span data-preserver-spaces=\"true\">This index was picked because of rule-based optimization, if there is an index that matches the predicate, it will be used. Since <strong>&#8220;California&#8221;<\/strong> appears as the state for all documents with a city of <strong>&#8220;Fremont&#8221;<\/strong> or <strong>&#8220;Oakland&#8221;<\/strong>, we can use an intersect of the\u00a0<\/span><strong><span data-preserver-spaces=\"true\">def_type<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0and the\u00a0<\/span><strong><span data-preserver-spaces=\"true\">def_city<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0indexes to get the most optimal performance.<\/span><\/p>\n<h2>Add More Data &amp; Fields<\/h2>\n<p><span data-preserver-spaces=\"true\">Now, let\u2019s add some more data. We will be adding 30,000 documents with the following new fields:<\/span><\/p>\n<ul>\n<li><strong><span data-preserver-spaces=\"true\">stars<\/span><\/strong><span data-preserver-spaces=\"true\">: Number<\/span><\/li>\n<li><strong><span data-preserver-spaces=\"true\">facing<\/span><\/strong><span data-preserver-spaces=\"true\">: String<\/span><\/li>\n<li><strong><span data-preserver-spaces=\"true\">hotelType<\/span><\/strong><span data-preserver-spaces=\"true\">: String<\/span><\/li>\n<li><strong><span data-preserver-spaces=\"true\">majorAmmenities<\/span><\/strong><span data-preserver-spaces=\"true\">: Array of Strings<\/span><\/li>\n<\/ul>\n<p><span data-preserver-spaces=\"true\">If you would like to follow along, clone the<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/github.com\/httpJunkie\/travel-sample-fake-hotels\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0<\/span><em><span data-preserver-spaces=\"true\">travel-sample-fake-hotels<\/span><\/em><\/a><span data-preserver-spaces=\"true\">\u00a0repo and before running the server.js file, ensure that your Couchbase username and password in the connection code are correct.<\/span><\/p>\n<pre><code class=\"language-bash\">node server<\/code><\/pre>\n<p><span style=\"font-weight: 400\">Once finished, this will bring our overall document count to 61,631 with 30,000 of those being newly added documents with our new fields that we would like to start using in our query predicates. <\/span><\/p>\n<pre class=\"\">WHERE type=\"hotel\" AND hotelType = \"Garden\"<\/pre>\n<p>When we add a query against our new data using a predicate with our new fields, our query is not going to perform optimally. We would need to add a new index. Something like:<\/p>\n<pre><code class=\"language-SQL\">CREATE INDEX `def_hotelType` ON `travel-sample`(`hotelType`)<\/code><\/pre>\n<p>In a production environment, adding one index can sometimes be tedious and require a DBA as well, our indexes need to be maintained over time.<\/p>\n<h2>Add Index for Hotel Type<\/h2>\n<p>If we wanted a better index for queries with predicates involving hotelType we could add the following:<\/p>\n<pre><code class=\"language-SQL\">CREATE INDEX `def_hotelType` \r\nON `travel-sample`(`hotelType`) \r\nWHERE (`type` = \"hotel\") USING GSI<\/code><\/pre>\n<p>At this point, running a query like the following:<\/p>\n<pre><code class=\"language-SQL\">SELECT * FROM `travel-sample`\r\nWHERE type = \"hotel\" \r\n  AND hotelType = \"Garden\"<\/code><\/pre>\n<p><span data-preserver-spaces=\"true\">Will use this index instead of the Primary or\u00a0<\/span><strong><span data-preserver-spaces=\"true\">def_type<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0index, with good reason. We will see that as we add new predicates to our queries to include the new fields we added like\u00a0<\/span><strong><span data-preserver-spaces=\"true\">stars<\/span><\/strong><span data-preserver-spaces=\"true\">,\u00a0<\/span><strong><span data-preserver-spaces=\"true\">facing<\/span><\/strong><span data-preserver-spaces=\"true\">,\u00a0<\/span><strong><span data-preserver-spaces=\"true\">hotelType,<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0and possibly even predicates based on checking our\u00a0<\/span><strong><span data-preserver-spaces=\"true\">majorAmmenities<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0array we will need to carefully add new indexes based on query strategy. Couchbase is pretty good at dealing with this, there are great resources like our blog (<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/www.couchbase.com\/blog\/create-right-index-get-right-performance\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">Create the Right Index, Get the Right Performance<\/span><\/a><span data-preserver-spaces=\"true\">) and there are other useful resources to help.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">But not creating the right index can cause many issues, one obvious being elapsed time to fetch your data.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">The following query utilizes the new fields we have added:<\/span><\/p>\n<pre><code class=\"language-SQL\">SELECT * FROM `travel-sample`\r\n WHERE type = \"hotel\" \r\n   AND hotelType = \"Garden\"\r\n   AND facing = \"north\"<\/code><\/pre>\n<p><span data-preserver-spaces=\"true\">In the situation above, if we had not created the\u00a0<\/span><strong><span data-preserver-spaces=\"true\">def_hotelType<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0index, we could see query times of more than 5 seconds vs 500ms.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Overhead for an index like this is about ten seconds to build and it will deliver tenfold results considering overall time and performance when retrieving your data. Remember, there are 30k of documents to sift through in the case where we use the wrong index.<\/span><\/p>\n<h2>Add More Indexes to Keep Up<\/h2>\n<p>Depending on how much data we have and many other characteristics of our data, adding another index for predicates looking to query on the field \u201cfacing\u201d, which indicates what side of the property the entrance to a hotel is facing.<\/p>\n<pre><code class=\"language-SQL\">CREATE INDEX `def_facing` \r\nON `travel-sample`(`facing`) \r\nWHERE (`type` = \"hotel\") USING GSI<\/code><\/pre>\n<p><span style=\"font-weight: 400\">Better yet, we could use the ADVISE feature to add a new index, this latter suggestion is recommended over adding an individual index. If we use the ADVISE feature we get the recommendation of the following index to be added:<\/span><\/p>\n<pre><code class=\"language-SQL\">CREATE INDEX `adv_facing_hotelType_type`  \r\nON `travel-sample`(`facing`,`hotelType`) \r\nWHERE `type` = 'hotel'<\/code><\/pre>\n<p><span style=\"font-weight: 400\">We could get better performance from the <\/span><b>adv_facing_hotelType_type<\/b><span style=\"font-weight: 400\"> index that was suggested, but when you consider other permutations of a query similar to this one, but in different order of operations, we get different results. These are all things to be aware of when querying and knowing what indexes to use.<\/span><\/p>\n<p><span style=\"font-weight: 400\">What if we could query our data of type hotel, but with an index that could allow us to be more flexible with our queries? It could also allow for other developer experience considering it could be used for things like ad hoc queries and potentially be performant enough to use instead of our GSI indexes. What if there were an option of a single index.<\/span><\/p>\n<h2>Let&#8217;s Flex on This Data<\/h2>\n<p><span data-preserver-spaces=\"true\">In Couchbase Server 6.6, we have a feature in Flex indexing that may meet your needs. The cool thing is that I can show you very easily how to get started using it.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">We need to tell the N1QL query engine that we are intending to use a Flex Index. As well the query should have certain characteristics to use the Flex Indexing, considering those requirements are met, the N1QL query is transformed into an FTS query and run against the full-text index.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">As to not repeat the information in our documentation, it is still important for me to mention that there are<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs.couchbase.com\/server\/6.6\/n1ql\/n1ql-language-reference\/flex-indexes.html#semantic-differences\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0semantic differences<\/span><\/a><span data-preserver-spaces=\"true\">\u00a0and<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs-staging.couchbase.com\/server\/6.6\/n1ql\/n1ql-language-reference\/flex-indexes#restrictions\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0restrictions<\/span><\/a><span data-preserver-spaces=\"true\">\u00a0in N1QL queries vs Flex Indexes. For this reason, we will try to avoid those restrictions and be cognizant of the semantic differences.<\/span><\/p>\n<h2>Setting up Our FTS Flex Index<\/h2>\n<p><span style=\"font-weight: 400\">I<\/span><span data-preserver-spaces=\"true\">n order to get a Flex Index to run our query instead of the indexes we already have set up for our travel-sample dataset, we just need to go to the search tab in the Couchbase Server Web UI and click <strong>&#8220;Add Index&#8221;<\/strong> and fill in the following fields.<\/span><\/p>\n<ol>\n<li><span data-preserver-spaces=\"true\">For the\u00a0<\/span><strong><span data-preserver-spaces=\"true\">name<\/span><\/strong><span data-preserver-spaces=\"true\"> field, I&#8217;ve used <strong>&#8220;fts-index&#8221;<\/strong>, a more descriptive name is recommended<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Select the bucket that our documents are contained within<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">For the\u00a0<\/span><strong><span data-preserver-spaces=\"true\">JSON type field,<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0we will specify: type<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Click\u00a0<\/span><strong><span data-preserver-spaces=\"true\">+Add Type Mapping<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0and specify our document type: hotel<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Select\u00a0<\/span><strong><span data-preserver-spaces=\"true\">&#8220;keyword&#8221;<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0in the default analyzer dropdown<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Uncheck the\u00a0<\/span><strong><span data-preserver-spaces=\"true\">default<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0type mapping so that we don&#8217;t scan all document types in our bucket<\/span><\/li>\n<\/ol>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/ftsSimpleIndex_withNumbers.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9146\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/ftsSimpleIndex_withNumbers.png\" alt=\"\" width=\"1154\" height=\"826\" \/><\/a><\/p>\n<h2>Use FTS Hints<\/h2>\n<p>We still need to indicate that we would like to try and use Flex Indexing in our N1QL queries. In the situation above where we have a very basic N1QL query retrieving documents of type <strong>&#8220;hotel&#8221;<\/strong> if we wanted to alter that query to take advantage of Flex Indexing we would provide the <strong>(USING FTS)<\/strong> hint:<\/p>\n<pre><code class=\"language-SQL\">SELECT * FROM `travel-sample` USE INDEX (USING FTS)\r\n WHERE type = \"hotel\" \r\n   AND hotelType = \"Garden\"\r\n   AND facing = \"north\"<\/code><\/pre>\n<p><span style=\"font-weight: 400\">This query now uses the Flex Index that we set up and delegates Flex Indexing to handle this because of the generic nature of our index.<\/span><\/p>\n<h2>Our Query Options Are Many<\/h2>\n<p>Let&#8217;s try a few more queries, I have run them all and each seems to have similar benefits over the GSI indexes considering overall time to run the query and retrieve our data.<\/p>\n<p>Here we have added a city predicate.<\/p>\n<pre><code class=\"language-SQL\">SELECT * FROM `travel-sample` USE INDEX (USING FTS)\r\n WHERE type = \"hotel\" \r\n   AND facing = \"north\"\r\n   AND hotelType = \"Garden\"\r\n   AND (city = \"Fremont\" OR city = \"Oakland\")<\/code><\/pre>\n<p>Next, we combine the city and stars field in our predicate.<\/p>\n<pre><code class=\"language-SQL\">SELECT * FROM `travel-sample` USE INDEX (USING FTS)\r\nWHERE type = \"hotel\" \r\nAND (city = \"Fremont\" OR city = \"Oakland\")\r\nAND stars &gt; 3<\/code><\/pre>\n<p>What if we leave off type=&#8221;hotel&#8221;? (16s primary scan)<\/p>\n<pre><code class=\"language-SQL\">SELECT * FROM `travel-sample` USE INDEX (USING FTS)\r\nWHERE hotelType = \"Garden\"\r\nAND stars &gt; 3<\/code><\/pre>\n<p><span data-preserver-spaces=\"true\">We want to ensure we add\u00a0<\/span><strong><span data-preserver-spaces=\"true\">WHERE type=&#8221;hotel&#8221;<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0to our predicate, when using the specific Flex Index that we set up, remember that in a sense, it&#8217;s the most important part of our query predicate and our Flex Index will not get picked up otherwise. An index that is type mapped will not be selected by N1QL if the condition expression (e.g\u00a0<\/span><strong><span data-preserver-spaces=\"true\">type = \u201chotel\u201d<\/span><\/strong><span data-preserver-spaces=\"true\">) is missing in the query.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Let&#8217;s use the\u00a0<\/span><strong><span data-preserver-spaces=\"true\">majorAmmenities<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0field and check if it has a string of\u00a0<\/span><strong><span data-preserver-spaces=\"true\">&#8220;Restaurant&#8221;<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0contained.<\/span><\/p>\n<pre><code class=\"language-SQL\">SELECT * \r\nFROM `travel-sample` USE INDEX (USING FTS)\r\nWHERE type=\"hotel\"\r\nAND ARRAY_CONTAINS(majorAmmenities, \"Restaurant\")\r\nAND city = \"Oakland\"<\/code><\/pre>\n<h2><span style=\"font-weight: 400\">Wrap Up<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">We have walked through the basics of GSI Indexes and Flex Indexing, shown you how to get started with Indexing in Couchbase. None of this should be a substitute for reading the documentation but may help you get started easier. With this knowledge, you should now understand how to approach Flex Indexing.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Thanks for reading and please,<\/span><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/docs-staging.couchbase.com\/server\/6.6\/n1ql\/n1ql-language-reference\/flex-indexes.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-preserver-spaces=\"true\">\u00a0check out the Flex Indexing documentation<\/span><\/a><span data-preserver-spaces=\"true\">\u00a0for more info!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will touch on some practical examples starting with N1QL queries using\u00a0GSI Indexes\u00a0and simulate a dataset that over time grows not just with document size, but the actual document structure growing as well. Couchbase Server makes flexible [&hellip;]<\/p>\n","protected":false},"author":53002,"featured_media":9226,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,1822,1812],"tags":[7522,1695,1696],"ppma_author":[8922],"class_list":["post-9099","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-node-js","category-n1ql-query","tag-flex-index","tag-gsi","tag-indexing"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>FTS Flex Index vs GSI Indexes in Couchbase Server 6.6 - The Couchbase Blog<\/title>\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\/fts-flex-indexes-in-couchbase-server-6-6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6\" \/>\n<meta property=\"og:description\" content=\"In this article, we will touch on some practical examples starting with N1QL queries using\u00a0GSI Indexes\u00a0and simulate a dataset that over time grows not just with document size, but the actual document structure growing as well. Couchbase Server makes flexible [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-12T18:11:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-24T12:55:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/FTS-Flex-Index-vs-GSI-Indexes-in-Couchbase-Server-6.6.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Eric Bishard\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@httpJunkie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eric Bishard\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/\"},\"author\":{\"name\":\"Eric Bishard\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/67d3a4b597e42370ccd34b715a6b1f4c\"},\"headline\":\"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6\",\"datePublished\":\"2020-08-12T18:11:35+00:00\",\"dateModified\":\"2023-05-24T12:55:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/\"},\"wordCount\":1617,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/title_searching_records_03.png\",\"keywords\":[\"Flex Index\",\"GSI\",\"Indexing\"],\"articleSection\":[\"Best Practices and Tutorials\",\"Node.js\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/\",\"name\":\"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6 - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/title_searching_records_03.png\",\"datePublished\":\"2020-08-12T18:11:35+00:00\",\"dateModified\":\"2023-05-24T12:55:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/title_searching_records_03.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/title_searching_records_03.png\",\"width\":1300,\"height\":514,\"caption\":\"searching through records\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6\"}]},{\"@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\/67d3a4b597e42370ccd34b715a6b1f4c\",\"name\":\"Eric Bishard\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/b7d1d2580c41d35a21654fb1abe65d23\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a316a2658772914defd259571b8cad18878eb23c9d0cc3a97dd803deca0c09ca?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a316a2658772914defd259571b8cad18878eb23c9d0cc3a97dd803deca0c09ca?s=96&d=mm&r=g\",\"caption\":\"Eric Bishard\"},\"description\":\"International speaker, blogging and advocating for the JavaScript, React, GraphQL and NoSQL community working as a Senior Developer Advocate for Couchbase.\",\"sameAs\":[\"https:\/\/www.reactstateofmind.com\",\"https:\/\/www.linkedin.com\/in\/eric-b\/\",\"https:\/\/x.com\/httpJunkie\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/eric-bishard\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6 - The Couchbase Blog","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\/fts-flex-indexes-in-couchbase-server-6-6\/","og_locale":"en_US","og_type":"article","og_title":"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6","og_description":"In this article, we will touch on some practical examples starting with N1QL queries using\u00a0GSI Indexes\u00a0and simulate a dataset that over time grows not just with document size, but the actual document structure growing as well. Couchbase Server makes flexible [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/","og_site_name":"The Couchbase Blog","article_published_time":"2020-08-12T18:11:35+00:00","article_modified_time":"2023-05-24T12:55:33+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/08\/FTS-Flex-Index-vs-GSI-Indexes-in-Couchbase-Server-6.6.png","type":"image\/png"}],"author":"Eric Bishard","twitter_card":"summary_large_image","twitter_creator":"@httpJunkie","twitter_misc":{"Written by":"Eric Bishard","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/"},"author":{"name":"Eric Bishard","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/67d3a4b597e42370ccd34b715a6b1f4c"},"headline":"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6","datePublished":"2020-08-12T18:11:35+00:00","dateModified":"2023-05-24T12:55:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/"},"wordCount":1617,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/title_searching_records_03.png","keywords":["Flex Index","GSI","Indexing"],"articleSection":["Best Practices and Tutorials","Node.js","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/","url":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/","name":"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6 - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/title_searching_records_03.png","datePublished":"2020-08-12T18:11:35+00:00","dateModified":"2023-05-24T12:55:33+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/title_searching_records_03.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/08\/title_searching_records_03.png","width":1300,"height":514,"caption":"searching through records"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/fts-flex-indexes-in-couchbase-server-6-6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FTS Flex Index vs GSI Indexes in Couchbase Server 6.6"}]},{"@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\/67d3a4b597e42370ccd34b715a6b1f4c","name":"Eric Bishard","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/b7d1d2580c41d35a21654fb1abe65d23","url":"https:\/\/secure.gravatar.com\/avatar\/a316a2658772914defd259571b8cad18878eb23c9d0cc3a97dd803deca0c09ca?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a316a2658772914defd259571b8cad18878eb23c9d0cc3a97dd803deca0c09ca?s=96&d=mm&r=g","caption":"Eric Bishard"},"description":"International speaker, blogging and advocating for the JavaScript, React, GraphQL and NoSQL community working as a Senior Developer Advocate for Couchbase.","sameAs":["https:\/\/www.reactstateofmind.com","https:\/\/www.linkedin.com\/in\/eric-b\/","https:\/\/x.com\/httpJunkie"],"url":"https:\/\/www.couchbase.com\/blog\/author\/eric-bishard\/"}]}},"authors":[{"term_id":8922,"user_id":53002,"is_guest":0,"slug":"eric-bishard","display_name":"Eric Bishard","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/a316a2658772914defd259571b8cad18878eb23c9d0cc3a97dd803deca0c09ca?s=96&d=mm&r=g","author_category":"","last_name":"Bishard","first_name":"Eric","job_title":"","user_url":"https:\/\/www.reactstateofmind.com","description":"International speaker, blogging and advocating for the JavaScript, React, GraphQL and NoSQL community working as a Senior Developer Advocate for Couchbase."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/9099","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\/53002"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=9099"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/9099\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/9226"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=9099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=9099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=9099"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=9099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}