{"id":6738,"date":"2019-04-22T23:46:13","date_gmt":"2019-04-23T06:46:13","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=6738"},"modified":"2025-06-13T20:59:10","modified_gmt":"2025-06-14T03:59:10","slug":"search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/","title":{"rendered":"Search &amp; Rescue: 7 Reasons N1QL Developers Use Search"},"content":{"rendered":"\r\n<figure class=\"wp-block-pullquote\">\r\n<blockquote>\r\n<p><br \/><strong>People don\u2019t want a four key index. \u00a0They need a four-ms response.<\/strong><\/p>\r\n<cite><a href=\"https:\/\/en.wikiquote.org\/wiki\/Theodore_Levitt\">Ted Levitt<\/a><\/cite><\/blockquote>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>Application development is demanding. Each application is trying to progress on behalf of the customer &#8212; searching for the right product or the right form, ordering, canceling, shipping, checking the status, etc.<\/p>\r\n<p>The typical query and B-Tree based databases and infrastructure are suitable for developing many of the modules. Still, there are cases where SQL &amp; B-Tree based searching is ineffective in meeting your SLA.<\/p>\r\n<p>Here are the seven problems you&#8217;d encounter in SQL development and solutions for them using Search technology. I&#8217;ve used Couchbase N1QL as the SQL implementation example, Couchbase GSI as the sample B-Tree based indexes (logically speaking) and FTS (Couchbase Full-Text Search) as the example search technology.<\/p>\r\n<p>I&#8217;ll also use the <strong>travel-sample<\/strong> model and data in the Couchbase sample dataset in the examples.<\/p>\r\n\r\n<h4><span style=\"text-decoration: underline\"><span style=\"color: #0000ff;text-decoration: underline\">Developer Challenges<\/span><\/span><\/h4>\r\n\r\n<p><strong> 1. The NAME search problem (aka the LIKE problem)<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Social media may like to <em>like<\/em> often, but SQL doesn\u2019t. Like predicates are one of the first things to look at when they\u2019re used in a query. Without careful usage, LIKE predicate will increase your latency, bring down your throughput and shut down your operation. \u00a0Here is a sample LIKE predicates I\u2019ve seen in real customer applications.<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>WHERE name LIKE \u201c%joe%\u201d;<\/li>\r\n<li>WHERE UPPER(name) LIKE \u201c%JOE%\u201d<\/li>\r\n<li>WHERE REGEX_CONTAINS(name, \u201c.*joe.*\u201d)<\/li>\r\n<li>WHERE name LIKE \u201c% joe %\u201d<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Problems:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Even when you have an index on the name, you\u2019ll have to scan the entire index to determine all the documents with joe.<\/li>\r\n<li>You\u2019d have to create a functional index (e.g. UPPER(name)) and have the additional key with the name to save the exact case of the name. \u00a0E.g. McDonald<\/li>\r\n<li>With the first three predicates, you\u2019ll not only get joe, but also strings joel, sojoel, bejoel, etc.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p><strong>2. The multi-match problem<\/strong><\/p>\r\n\r\n\r\n\r\n<p>When names are split into first name, middle name, last name, you\u2019d need to search everywhere. Sometimes, you\u2019d want to search for a string in any one of the names. \u00a0\u00a0Combine that with matching their call number. Your query will look something like this.<\/p>\r\n\r\n\r\n\r\n<p><br \/>SELECT c.customerid, c.fname, c.mname, c.lname, c.address<br \/>FROM customer c<br \/>WHERE (c.fname in [&#8216;John&#8217;, &#8216;Doe&#8217;]<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0OR c.mname in [&#8216;John&#8217;, \u2018Doe\u2019]<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0OR c.lname in [\u2018John\u2019, \u2018Doe\u2019])<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0OR (ANY p in c.contacts satisfies p = &#8216;6509264813&#8217;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0OR (ANY q in c.services satisfies q = &#8216;6509264813&#8217;)<\/p>\r\n\r\n\r\n\r\n<p>Now, try to create a B-TREE index that gives you not only the low latency you want but also high throughput. \u00a0<\/p>\r\n\r\n\r\n\r\n<p><strong>3. Beyond the exact match<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Real world matches are inexact. \u00a0William can be abbreviated to <a href=\"https:\/\/en.m.wikipedia.org\/wiki\/William\">Will, Willy, Bill, and Billy<\/a>. \u00a0The Irish and the Scottish have additional abbreviations. \u00a0How do you search for Billy and end up with a William?<\/p>\r\n\r\n\r\n\r\n<p><strong><br \/>4. Search based on business requirements<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Each business has rules on resolving customer information (name, address, and date of birth) to a particular customer. \u00a0Some give higher priority to address others to name or address. Rules can say, the two out of four will have to be an exact match and others have to be a partial match. \u00a0\u00a0\u00a0\u00a0N1QL predicates become even more complex than the second case. So, the GSI index suitable for the query gets complicated as well.<\/p>\r\n\r\n\r\n\r\n<p><strong>5. Relevance ordering<\/strong><\/p>\r\n\r\n\r\n\r\n<p>N1QL\u2019s ordering is based on the ORDER BY clause and the expression within it. When you\u2019re doing an inexact match, you may want the order based on the text score and the distance from the given search pattern.<\/p>\r\n\r\n\r\n\r\n<p><strong>6. The array problem.<\/strong><\/p>\r\n\r\n\r\n\r\n<p>JSON arrays give you the ability to store the 1:N, N:M relationships as an array of objects or arrays with links to other objects. <a href=\"https:\/\/www.couchbase.com\/blog\/working-json-arrays-n1ql\/\">This article<\/a> gives you details on manipulating arrays. The <a href=\"https:\/\/dzone.com\/articles\/nesting-and-unnesting-in-couchbase-n1ql\">second article<\/a> describes additional set-oriented operations on arrays. To get the best performance while searching inside arrays, you need to <a href=\"https:\/\/docs.couchbase.com\/server\/6.0\/n1ql\/n1ql-language-reference\/indexing-arrays.html\">create indexes with array keys<\/a>. The array index comes with a limitation: each array index can only have one array key per index. So, when you have a customer object with multiple array fields, you can&#8217;t search all of them using a single index. When you have customers with an array of contact numbers and an array of email contacts, you can&#8217;t search by both using a single index, causing expensive queries. This is a <a href=\"https:\/\/docs.mongodb.com\/manual\/core\/index-multikey\/#limitations\">common limitation of b-tree based array indexes<\/a>. Since the B-tree index stores individual array elements as distinct keys, having multiple array keys will require the index to store the product of the number of keys (in the example above, (number of contact numbers) * (number of emails). The index size will increase exponentially. To avoid this, the products disable creating multiple array keys for a single index.<\/p>\r\n\r\n\r\n\r\n<p>But, the developer&#8217;s job to efficiently look up in multiple JSON arrays remain.<\/p>\r\n\r\n\r\n\r\n<p><strong>7. Multiple queries, single index.<\/strong><\/p>\r\n\r\n\r\n\r\n<p>JSON model has been successfully used to aggregate information from multiple sources. The point of aggregating all this information is not to just simply store them, but to query them and get business value. When you have an ad-hoc query on a dataset, it&#8217;s difficult to pre-plan and re-create the indexes needed for it. N1QL itself provides the <a href=\"https:\/\/docs.couchbase.com\/server\/6.0\/n1ql\/n1ql-language-reference\/adaptive-indexing.html\">adaptive index<\/a> method that helps in certain use cases. If you have multiple predicates, each of which can return a large resultset, the adaptive index will run into performance issues due to the amount of data transfer from index to the query node and large intermediate result set.<\/p>\r\n\r\n\r\n\r\n<p>In this case, developers need to continuously monitor and tune the indexes. The users with performance issues will continue to complain.<\/p>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n<h4><span style=\"text-decoration: underline\"><span style=\"color: #0000ff;text-decoration: underline\">Solutions:<\/span><\/span><\/h4>\r\n\r\n<p><strong>1.The NAME search problem (aka the LIKE problem)<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Whether you&#8217;re searching for joe, Joel or jolly, they all tend to be individual words. Typically you&#8217;re not searching for la<strong>joe<\/strong>lla. The search index takes each word in your field (name, title or comment), analyzes it based on the language characteristics, categorizes the words into stop words (uninteresting and not usually searched for &#8211; e.g.: and, or, not, the in English) and terms. Indexing the term instead of the actual word has two benefits.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>It groups the related words together: <em>francis<\/em>, <em>francisco<\/em>, <em>frank<\/em>, <em>francois<\/em>, etc. When you search for francisco, you&#8217;ll also find closely related word <em>francis<\/em>.<\/li>\r\n<li>This grouping will also reduce the size of the index because we only need to index the root term instead of every modifier for that word.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p>Back to the name search: Let&#8217;s now search for the hotel name.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Create an FTS index on documents of type <strong>&#8216;hotel&#8217; <\/strong>and the field <strong>name<\/strong> in the document.<\/li>\r\n<li>Start searching for name:\r\n<ul>\r\n<li>Here&#8217;s the query to run:<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p class=\"editor-rich-text__tinymce mce-content-body\"><strong>curl -XPOST -H &#8220;Content-Type: application\/json&#8221; \\ https:\/\/172.23.120.38:8094\/api\/index\/trhotelname\/query \\ -d &#8216;{ &#8220;explain&#8221;: true, &#8220;fields&#8221;: [ &#8220;*&#8221; ], &#8220;highlight&#8221;: {}, &#8220;query&#8221;: { &#8220;query&#8221;: &#8220;francisco&#8221; } }&#8217;<\/strong><\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Searching for <strong>francisco<\/strong> gives you the hotel names:\r\n<ul>\r\n<li>\r\n<ul>\r\n<li>&#8220;name&#8221;: &#8220;The Opal San Francisco&#8221;,<\/li>\r\n<li>&#8220;name&#8221;: &#8220;Francisco Bay Inn&#8221;,<\/li>\r\n<li>and more (totally 11 results).<\/li>\r\n<li>\u00a0<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p><strong>2.The multi-match problem <\/strong><\/p>\r\n\r\n\r\n\r\n<p>We saw the complex query earlier.<\/p>\r\n\r\n\r\n\r\n<p>SELECT c.customerid, c.fname, c.mname, c.lname, c.address<br \/>FROM customer c<br \/>WHERE (c.fname in [&#8216;John&#8217;, &#8216;Doe&#8217;]<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0OR c.mname in [&#8216;John&#8217;, \u2018Doe\u2019]<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0OR c.lname in [\u2018John\u2019, \u2018Doe\u2019])<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0OR (ANY p in c.contacts satisfies p = &#8216;6509264813&#8217;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0OR (ANY q in c.services satisfies q = &#8216;6509264813&#8217;)<\/p>\r\n\r\n\r\n\r\n<p>On FTS, we can define a <a href=\"https:\/\/docs.couchbase.com\/server\/6.0\/fts\/fts-creating-indexes.html\">special _all field<\/a> that combines multiple fields. Searching on this index automatically searches on ALL of the fields. (Also see <a href=\"https:\/\/dzone.com\/articles\/8-ways-to-customize-couchbase-full-text-search-ind-1\">this article<\/a>) This is an index on five fields in the hotel document:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>city<\/li>\r\n<li>country<\/li>\r\n<li>name<\/li>\r\n<li>public_likes (an array field)<\/li>\r\n<li>description<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p>Example values for the five fields:<\/p>\r\n\r\n\r\n\r\n<p>[<br \/>{<br \/>&#8220;city&#8221;: &#8220;Medway&#8221;,<br \/>&#8220;country&#8221;: &#8220;United Kingdom&#8221;,<br \/>&#8220;description&#8221;: &#8220;40 bed summer hostel about 3 miles from Gillingham, housed in a distinctive converted Oast House in a semi-rural setting.&#8221;,<br \/>&#8220;name&#8221;: &#8220;Medway Youth Hostel&#8221;,<br \/>&#8220;public_likes&#8221;: [<br \/>&#8220;Julius Tromp I&#8221;,<br \/>&#8220;Corrine Hilll&#8221;,<br \/>&#8220;Jaeden McKenzie&#8221;,<br \/>&#8220;Vallie Ryan&#8221;,<br \/>&#8220;Brian Kilback&#8221;,<br \/>&#8220;Lilian McLaughlin&#8221;,<br \/>&#8220;Ms. Moses Feeney&#8221;,<br \/>&#8220;Elnora Trantow&#8221;<br \/>]<br \/>}<br \/>]<\/p>\r\n\r\n\r\n\r\n<p>Once you define the search index on all these fields, simply start querying.<\/p>\r\n\r\n<pre class=\"theme:github font-size:15 height-set:true width-set:true scroll:true whitespace-before:2 whitespace-after:2 lang:js decode:true   \" title=\"Search for \">curl -XPOST -H \"Content-Type: application\/json\" \\\r\nhttps:\/\/172.23.120.38:8094\/api\/index\/trinfoall\/query \\\r\n-d '{\r\n  \"explain\": true,\r\n  \"fields\": [\r\n    \"*\"\r\n  ],\r\n  \"highlight\": {},\r\n  \"query\": {\r\n    \"query\": \"summer\"\r\n  }\r\n}'<\/pre>\r\n<p>&nbsp;<\/p>\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n<pre class=\"theme:github height-set:true width-set:true wrap:true scroll:true whitespace-before:1 whitespace-after:1 lang:js decode:true \" title=\"flexible querying with matching from multiple fields\">curl -XPOST -H \"Content-Type: application\/json\" \\\r\nhttps:\/\/172.23.120.38:8094\/api\/index\/trinfoall\/query \\\r\n-d '{\r\n  \"explain\": true,\r\n  \"fields\": [\r\n    \"*\"\r\n  ],\r\n  \"highlight\": {},\r\n  \"query\": {\r\n    \"query\": \"medway \\\"Vallie Ryan\\\"  united kingdom\"\r\n  }\r\n}'<\/pre>\r\n<p>&nbsp;<\/p>\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p>Here&#8217;s the index definition for the _all field index used here.<\/p>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n<pre class=\"theme:github height-set:true height:700 width-set:true width:700 lang:js decode:true\" title=\"FTS index definition for the _all field\">{\r\n  \"type\": \"fulltext-index\",\r\n  \"name\": \"trinfoall\",\r\n  \"uuid\": \"430401ce6b5c1879\",\r\n  \"sourceType\": \"couchbase\",\r\n  \"sourceName\": \"travel-sample\",\r\n  \"sourceUUID\": \"ddd78a53e740e6a8274e13c990b47abc\",\r\n  \"planParams\": {\r\n    \"maxPartitionsPerPIndex\": 171\r\n  },\r\n  \"params\": {\r\n    \"doc_config\": {\r\n      \"docid_prefix_delim\": \"\",\r\n      \"docid_regexp\": \"\",\r\n      \"mode\": \"type_field\",\r\n      \"type_field\": \"type\"\r\n    },\r\n    \"mapping\": {\r\n      \"analysis\": {},\r\n      \"default_analyzer\": \"standard\",\r\n      \"default_datetime_parser\": \"dateTimeOptional\",\r\n      \"default_field\": \"_all\",\r\n      \"default_mapping\": {\r\n        \"dynamic\": true,\r\n        \"enabled\": false\r\n      },\r\n      \"default_type\": \"_default\",\r\n      \"docvalues_dynamic\": true,\r\n      \"index_dynamic\": true,\r\n      \"store_dynamic\": false,\r\n      \"type_field\": \"_type\",\r\n      \"types\": {\r\n        \"hotel\": {\r\n          \"dynamic\": true,\r\n          \"enabled\": true,\r\n          \"properties\": {\r\n            \"city\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"city\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            },\r\n            \"country\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"country\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            },\r\n            \"description\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"description\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            },\r\n            \"name\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"name\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            },\r\n            \"public_likes\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"public_likes\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            }\r\n          }\r\n        }\r\n      }\r\n    },\r\n    \"store\": {\r\n      \"indexType\": \"scorch\",\r\n      \"kvStoreName\": \"\"\r\n    }\r\n  },\r\n  \"sourceParams\": {}\r\n}<\/pre>\r\n<p>&nbsp;<\/p>\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p><strong>3. Beyond the exact match<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Search (FTS) does more than an exact search. It does the term search, range search, fuzzy search, conjuncts, disjuncts, geo search (nearest neighbor), regex search, boosted search, phrase search and more. See examples and details in <a href=\"https:\/\/docs.couchbase.com\/server\/6.0\/fts\/fts-query-types.html\">Couchbase FTS documentation<\/a>.<\/p>\r\n\r\n\r\n\r\n<p><strong>4.Search based on business (your) requirements<\/strong><\/p>\r\n\r\n\r\n\r\n<p>When you&#8217;re searching for hotels in New York, you may prefer Manhattan hotels, but want to see other hotels as well. Now, simply boost the Manhattan search term by appending ^5. This boosting improves the score of the documents that contain Manhattan. The results are ordered in the descending order of score by default.<\/p>\r\n\r\n\r\n\r\n<p><strong>5. Relevance Ordering<\/strong><\/p>\r\n\r\n\r\n\r\n<p>In SQL ordering is based on the value of the expression or the field itself. In search, the relevance of a document is calculated by the distance between what you&#8217;re searching for and what the document contains. This is the score we manipulated by boosting the importance of a term in the previous section. You can<a href=\"https:\/\/docs.couchbase.com\/server\/6.0\/fts\/fts-sorting.html\"> sort the results<\/a> by this score and any other field by using the sort clause of the search request.<\/p>\r\n\r\n\r\n\r\n<p><strong>6.The array problem<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Now, let&#8217;s create a single index on the following four arrays.<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>public_likes<\/li>\r\n<li>reviews.author<\/li>\r\n<li>reviews.ratings.Location<\/li>\r\n<li>reviews.ratings.Service<\/li>\r\n<\/ol>\r\n\r\n<p>Here&#8217;s the index definition. This is a single index on <strong><span style=\"color: #0000ff\">four array keys<\/span>. <\/strong>This is something you could never do in a B-tree based index.<\/p>\r\n\r\n<p>Now, you can query using predicates on one or more of the fields above.<\/p>\r\n\r\n\r\n\r\n<p>EXAMPLE 1: hotels liked by &#8220;Vallie Ryan&#8221; or Service rating greater than 4<\/p>\r\n\r\n\r\n\r\n<p>&#8216;{ <br \/>&#8220;explain&#8221;: true, <br \/>&#8220;fields&#8221;: [ &#8220;*&#8221; ], <br \/>&#8220;highlight&#8221;: {}, <br \/>&#8220;query&#8221;: { &#8220;query&#8221;: &#8220;+public_likes:\\&#8221;Vallie Ryan\\&#8221; reviews.ratings.Service:&gt;4&#8243; } <br \/>}&#8217;<\/p>\r\n\r\n\r\n\r\n<p>Full Index Definition.<\/p>\r\n\r\n<pre class=\"theme:github font-size:15 height-set:true height:700 width-set:true width:700 whitespace-before:1 whitespace-after:1 lang:js decode:true\" title=\"Index definition\">{\r\n  \"type\": \"fulltext-index\",\r\n  \"name\": \"trmultiarrayidx\",\r\n  \"uuid\": \"7b3a85992989e196\",\r\n  \"sourceType\": \"couchbase\",\r\n  \"sourceName\": \"travel-sample\",\r\n  \"sourceUUID\": \"ddd78a53e740e6a8274e13c990b47abc\",\r\n  \"planParams\": {\r\n    \"maxPartitionsPerPIndex\": 171\r\n  },\r\n  \"params\": {\r\n    \"doc_config\": {\r\n      \"docid_prefix_delim\": \"\",\r\n      \"docid_regexp\": \"\",\r\n      \"mode\": \"type_field\",\r\n      \"type_field\": \"type\"\r\n    },\r\n    \"mapping\": {\r\n      \"analysis\": {},\r\n      \"default_analyzer\": \"standard\",\r\n      \"default_datetime_parser\": \"dateTimeOptional\",\r\n      \"default_field\": \"_all\",\r\n      \"default_mapping\": {\r\n        \"dynamic\": true,\r\n        \"enabled\": false\r\n      },\r\n      \"default_type\": \"_default\",\r\n      \"docvalues_dynamic\": true,\r\n      \"index_dynamic\": true,\r\n      \"store_dynamic\": false,\r\n      \"type_field\": \"_type\",\r\n      \"types\": {\r\n        \"hotel\": {\r\n          \"dynamic\": false,\r\n          \"enabled\": true,\r\n          \"properties\": {\r\n            \"public_likes\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"public_likes\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            },\r\n            \"reviews.author\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"reviews.author\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            },\r\n            \"reviews.ratings.Location\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"reviews.ratings.Location\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            },\r\n            \"reviews.ratings.Service\": {\r\n              \"dynamic\": false,\r\n              \"enabled\": true,\r\n              \"fields\": [\r\n                {\r\n                  \"docvalues\": true,\r\n                  \"include_in_all\": true,\r\n                  \"include_term_vectors\": true,\r\n                  \"index\": true,\r\n                  \"name\": \"reviews.ratings.Service\",\r\n                  \"type\": \"text\"\r\n                }\r\n              ]\r\n            }\r\n          }\r\n        }\r\n      }\r\n    },\r\n    \"store\": {\r\n      \"indexType\": \"scorch\",\r\n      \"kvStoreName\": \"\"\r\n    }\r\n  },\r\n  \"sourceParams\": {}\r\n}<\/pre>\r\n<p>&nbsp;<\/p>\r\n\r\n<p><strong>7.Multiple Queries, Single Index.<\/strong><\/p>\r\n\r\n\r\n\r\n<p><em>&#8220;Sometimes, queries are like a box of chocolates. You don&#8217;t know what query you&#8217;re going to get.&#8221;<\/em> When you want to expose the data to business users who can issue ad-hoc queries, you can&#8217;t create every kind of index to speed up every kind of query. Performance tuning requires a different approach.<\/p>\r\n\r\n\r\n\r\n<p>Consider the index created in section (2) above on the 5 fields:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>city<\/li>\r\n<li>country<\/li>\r\n<li>name<\/li>\r\n<li>public_likes (an array field)<\/li>\r\n<li>description<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p>If you created a B-Tree (GSI index in case of Couchbsae), it would look like the following:<\/p>\r\n\r\n\r\n\r\n<p>CREATE INDEX itravel ON `travel-sample`(city, country, name, DISTINCT public_likes, description) WHERE type = &#8216;hotel&#8217;;<\/p>\r\n\r\n\r\n\r\n<p>The queries that would benefit from this follow the <a href=\"https:\/\/www.couchbase.com\/blog\/create-right-index-get-right-performance\/\">rules explained here<\/a>. The major issue being each query block (specifically index scan) will have to use predicates on the leading key(s) of the index. This limits the efficacy of the index.<\/p>\r\n\r\n\r\n\r\n<p>With the search(FTS) index created above, you can query based on any conjucts, disjuncts, must have, etc with any combination. With complex queries, the search may take more than few milliseconds, but you&#8217;re doing all this in a single index. The flexibility with reasonable use of resources makes the search index very valuable.<\/p>\r\n\r\n\r\n\r\n<p><strong>Note: In the upcoming Couchbase release 6.5, we&#8217;ve made it easier to query using the search index. Binh Le has explained this in this article:<\/strong><a href=\"https:\/\/www.couchbase.com\/blog\/n1ql-and-search-how-to-leverage-fts-index-in-n1ql-query\/\">https:\/\/www.couchbase.com\/blog\/n1ql-and-search-how-to-leverage-fts-index-in-n1ql-query\/<\/a><\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>References<\/strong><\/h2>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Couchbase Documentation: <a href=\"https:\/\/docs.couchbase.com\/server\/6.0\/fts\/full-text-intro.html\">https:\/\/docs.couchbase.com\/server\/6.0\/fts\/full-text-intro.html<\/a><\/li>\r\n<li>Couchbase Search Resources: <a href=\"https:\/\/www.couchbase.com\/products\/full-text-search\/\">https:\/\/www.couchbase.com\/products\/full-text-search<\/a><\/li>\r\n<li>Couchbase FTS Online Training: <a href=\"https:\/\/learn.couchbase.com\/store\/509465-cb121-intro-to-couchbase-full-text-search-fts\">https:\/\/learn.couchbase.com\/store\/509465-cb121-intro-to-couchbase-full-text-search-fts<\/a><\/li>\r\n<li>Couchbase blogs: <a href=\"https:\/\/www.couchbase.com\/blog\/category\/full-text-search\/\">https:\/\/www.couchbase.com\/blog\/category\/full-text-search\/<\/a><\/li>\r\n<li>Comparing Couchbase and MongoDB text search: <a href=\"https:\/\/www.couchbase.com\/blog\/searching-json-comparing-text-search-in-couchbase-and-mongodb\/\">https:\/\/www.couchbase.com\/blog\/searching-json-comparing-text-search-in-couchbase-and-mongodb\/<\/a><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>People don\u2019t want a four key index. \u00a0They need a four-ms response. Ted Levitt Application development is demanding. Each application is trying to progress on behalf of the customer &#8212; searching for the right product or the right form, ordering, [&hellip;]<\/p>\n","protected":false},"author":55,"featured_media":6476,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1814,2165,9417,1812],"tags":[1309],"ppma_author":[8929],"class_list":["post-6738","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-design","category-full-text-search","category-performance","category-n1ql-query","tag-mongodb"],"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>Search &amp; Rescue: 7 Reasons N1QL Developers Use Search<\/title>\n<meta name=\"description\" content=\"Couchbase N1QL\/SQL can call full-text search queries, providing powerful benefits described here including fuzzy and natural language matching.\" \/>\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\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Search &amp; Rescue: 7 Reasons N1QL Developers Use Search\" \/>\n<meta property=\"og:description\" content=\"Couchbase N1QL\/SQL can call full-text search queries, providing powerful benefits described here including fuzzy and natural language matching.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-23T06:46:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T03:59:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM-1024x542.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"542\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Keshav Murthy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rkeshavmurthy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Keshav Murthy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/\"},\"author\":{\"name\":\"Keshav Murthy\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636\"},\"headline\":\"Search &amp; Rescue: 7 Reasons N1QL Developers Use Search\",\"datePublished\":\"2019-04-23T06:46:13+00:00\",\"dateModified\":\"2025-06-14T03:59:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/\"},\"wordCount\":1915,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM.png\",\"keywords\":[\"mongodb\"],\"articleSection\":[\"Application Design\",\"Full-Text Search\",\"High Performance\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/\",\"name\":\"Search &amp; Rescue: 7 Reasons N1QL Developers Use Search\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM.png\",\"datePublished\":\"2019-04-23T06:46:13+00:00\",\"dateModified\":\"2025-06-14T03:59:10+00:00\",\"description\":\"Couchbase N1QL\/SQL can call full-text search queries, providing powerful benefits described here including fuzzy and natural language matching.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM.png\",\"width\":2048,\"height\":1083},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Search &amp; Rescue: 7 Reasons N1QL Developers Use 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\/c261644262bf98e146372fe647682636\",\"name\":\"Keshav Murthy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4e51d72fc07c662aa791316deafffac4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g\",\"caption\":\"Keshav Murthy\"},\"description\":\"Keshav Murthy is a Vice President at Couchbase R&amp;D. Previously, he was at MapR, IBM, Informix, Sybase, with more than 20 years of experience in database design &amp; development. He lead the SQL and NoSQL R&amp;D team at IBM Informix. He has received two President's Club awards at Couchbase, two Outstanding Technical Achievement Awards at IBM. Keshav has a bachelor's degree in Computer Science and Engineering from the University of Mysore, India, holds eleven US patents and has four US patents pending.\",\"sameAs\":[\"https:\/\/blog.planetnosql.com\/\",\"https:\/\/x.com\/rkeshavmurthy\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/keshav-murthy\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Search &amp; Rescue: 7 Reasons N1QL Developers Use Search","description":"Couchbase N1QL\/SQL can call full-text search queries, providing powerful benefits described here including fuzzy and natural language matching.","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\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/","og_locale":"en_US","og_type":"article","og_title":"Search &amp; Rescue: 7 Reasons N1QL Developers Use Search","og_description":"Couchbase N1QL\/SQL can call full-text search queries, providing powerful benefits described here including fuzzy and natural language matching.","og_url":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/","og_site_name":"The Couchbase Blog","article_published_time":"2019-04-23T06:46:13+00:00","article_modified_time":"2025-06-14T03:59:10+00:00","og_image":[{"width":1024,"height":542,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM-1024x542.png","type":"image\/png"}],"author":"Keshav Murthy","twitter_card":"summary_large_image","twitter_creator":"@rkeshavmurthy","twitter_misc":{"Written by":"Keshav Murthy","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/"},"author":{"name":"Keshav Murthy","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636"},"headline":"Search &amp; Rescue: 7 Reasons N1QL Developers Use Search","datePublished":"2019-04-23T06:46:13+00:00","dateModified":"2025-06-14T03:59:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/"},"wordCount":1915,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM.png","keywords":["mongodb"],"articleSection":["Application Design","Full-Text Search","High Performance","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/","url":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/","name":"Search &amp; Rescue: 7 Reasons N1QL Developers Use Search","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM.png","datePublished":"2019-04-23T06:46:13+00:00","dateModified":"2025-06-14T03:59:10+00:00","description":"Couchbase N1QL\/SQL can call full-text search queries, providing powerful benefits described here including fuzzy and natural language matching.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/03\/Screen-Shot-2019-03-02-at-7.59.02-PM.png","width":2048,"height":1083},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/search-and-rescue-7-reasons-for-n1ql-sql-developers-to-use-search\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Search &amp; Rescue: 7 Reasons N1QL Developers Use 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\/c261644262bf98e146372fe647682636","name":"Keshav Murthy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4e51d72fc07c662aa791316deafffac4","url":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","caption":"Keshav Murthy"},"description":"Keshav Murthy is a Vice President at Couchbase R&amp;D. Previously, he was at MapR, IBM, Informix, Sybase, with more than 20 years of experience in database design &amp; development. He lead the SQL and NoSQL R&amp;D team at IBM Informix. He has received two President's Club awards at Couchbase, two Outstanding Technical Achievement Awards at IBM. Keshav has a bachelor's degree in Computer Science and Engineering from the University of Mysore, India, holds eleven US patents and has four US patents pending.","sameAs":["https:\/\/blog.planetnosql.com\/","https:\/\/x.com\/rkeshavmurthy"],"url":"https:\/\/www.couchbase.com\/blog\/author\/keshav-murthy\/"}]}},"authors":[{"term_id":8929,"user_id":55,"is_guest":0,"slug":"keshav-murthy","display_name":"Keshav Murthy","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","author_category":"","last_name":"Murthy","first_name":"Keshav","job_title":"","user_url":"https:\/\/blog.planetnosql.com\/","description":"Keshav Murthy is a Vice President at Couchbase R&amp;D. Previously, he was at MapR, IBM, Informix, Sybase, with more than 20 years of experience in database design &amp; development. He lead the SQL and NoSQL R&amp;D team at IBM Informix. He has received two President's Club awards at Couchbase, two Outstanding Technical Achievement Awards at IBM. Keshav has a bachelor's degree in Computer Science and Engineering from the University of Mysore, India,  holds ten US patents and has three US patents pending."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/6738","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\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=6738"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/6738\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/6476"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=6738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=6738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=6738"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=6738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}