{"id":2172,"date":"2016-02-24T09:37:32","date_gmt":"2016-02-24T09:37:31","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2172"},"modified":"2019-03-04T01:31:48","modified_gmt":"2019-03-04T09:31:48","slug":"sub-documents-change-only-what-you-need-to","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/","title":{"rendered":"Sub-documents: find and change only what you need"},"content":{"rendered":"<p>What separates a document store from a key-value store?<\/p>\n<p>A document database can query and manipulate the contents of what it stores, whereas the value remains an opaque mystery to the key-value store.<\/p>\n<p>With Couchbase Server 4.5, we\u2019ve introduced our new sub-document API to give you greater query and mutation access to the meat of your documents.<\/p>\n<h2>Sub-doc basics<\/h2>\n<p>So, what\u2019s the tl;dr of Couchbase\u2019s new sub-document features?<\/p>\n<ul>\n<li>Retrieve parts of a document.<\/li>\n<li>Change parts of a document by sending the changes to Couchbase Server.<\/li>\n<li>Available now in all official Couchbase Server SDKs.<\/li>\n<li>Compliments the query offered by views and the query and mutations offered by N1QL.<\/li>\n<\/ul>\n<p>Okay, let\u2019s get onto the why.<\/p>\n<h2>Why sub-document operations?<\/h2>\n<p>Let\u2019s say we have a 1 MB JSON document in Couchbase that stores a chat log between two people. Each time the chat participants write something new, we want to add it to the log document.<\/p>\n<p>Without sub-document operations, we\u2019d need to:<\/p>\n<ol>\n<li>fetch the entire document<\/li>\n<li>deserialise it in your application<\/li>\n<li>add the new line of the conversation<\/li>\n<li>serialise it back to JSON<\/li>\n<li>send the full document back to Couchbase to be stored.<\/li>\n<\/ol>\n<p>Using Couchbase\u2019s Python client, it would look something like this:<\/p>\n<pre><code class=\"language-python\">rv = cb.get('chatlog') # Get the entire document\r\nrv.doc.messages += ['nvm lol'] # Modify the doc locally\r\ncb.replace(rv.key, rv.doc, cas=rv.cas) # Upload entire document again<\/code><\/pre>\n<p>Seems pretty wasteful. Now consider the speed at which people tend to chat in instant messaging conversations. Then perhaps think of how many concurrent chats could be taking place.<\/p>\n<p>Couchbase Server can happily play its part there but it puts an unnecessary burden on your network and it makes you maintain application code to handle what you might reasonably consider to be database-layer functions.<\/p>\n<p>With sub-document operations, we get to do a lot less. Adding a new line to a chat log would look more like this, again in Python:<\/p>\n<pre><code class=\"language-python\">import couchbase.subdocument as SD\r\ncb.mutate_in('chatlog', SD.append('messages', 'nvm lol'))<\/code><\/pre>\n<p>We send the new line to Couchbase Server, specifying the document and where in the document to make the change.<\/p>\n<p>That way, we get to avoid a round-trip, save network bandwidth by sending only what has changed and move responsibility for updating the document from the application to the database layer.<\/p>\n<h2>How sub-document operations work<\/h2>\n<p>Your Couchbase SDK uses three APIs to work with Couchbase Server:<\/p>\n<ul>\n<li>key-value, using the memcached binary protocol<\/li>\n<li>views, using the CouchDB REST protocol<\/li>\n<li>N1QL, using N1QL\u2019s REST protocol.<\/li>\n<\/ul>\n<p>The SDK abstracts away the details but, if you\u2019ve worked with Couchbase Server, you know which type of interaction you\u2019re having.<\/p>\n<p>Sub-document operations happen using an extension of the memcached protocol that handles your key-value operations.<\/p>\n<h3>Finding your sub-document<\/h3>\n<p>To perform a sub-document operation you need two things:<\/p>\n<ul>\n<li>the document key<\/li>\n<li>the path of the sub-document within the parent document.<\/li>\n<\/ul>\n<p>What do we mean by path?<\/p>\n<p>The path is the location within the document where you want to do something and it\u2019s the same notation used by N1QL.<\/p>\n<p>Let\u2019s say we\u2019re working with customer profiles for a simple online store. Here\u2019s an example profile document:<\/p>\n<pre><code class=\"language-JSON\">{\r\n  \"name\": \"Douglas Reynholm\",\r\n  \"email\": \"douglas@reynholmindustries.com\",\r\n  \"addresses\": {\r\n    \"billing\": {\r\n      \"line1\": \"123 Any Street\",\r\n      \"line2\": \"Anytown \",\r\n      \"country\": \"United Kingdom\"\r\n    },\r\n    \"delivery\": {\r\n      \"line1\": \"123 Any Street\",\r\n      \"line2\": \"Anytown \",\r\n      \"country\": \"United Kingdom\"\r\n    }\r\n  },\r\n  \"purchases\": {\r\n    \"complete\": [\r\n      339, 976, 442, 666\r\n    ],\r\n    \"abandoned\": [\r\n      157, 42, 999\r\n    ]\r\n  }\r\n<\/code><\/pre>\n<p>The path to the country field in our customer\u2019s delivery address would be:<\/p>\n<pre><code>addresses.delivery.country\r\n<\/code><\/pre>\n<p>Similarly, if the purchases are listed new to old, to find the id of the customer\u2019s second most recent purchase we\u2019d use:<\/p>\n<pre><code>purchases.complete[1]\r\n<\/code><\/pre>\n<p>So, our sub-document is whichever portion of the document is found at the path we provide. It could be an enormous object or a single index in an array.<\/p>\n<h3>Using sub-document operations<\/h3>\n<p>At the bucket-level, things are really simple. There are just two new methods:<\/p>\n<ul>\n<li>lookupIn(key)<\/li>\n<li>mutateIn(key).<\/li>\n<\/ul>\n<p>In the Java SDK it is implemented using the builder pattern. So, these two bucket methods create for us an object, tied to a particular document, where we can do the actual work of querying or changing our sub-document.<\/p>\n<p>Let\u2019s take a look at an example in Java, where we\u2019re finding the delivery address of our customer.<\/p>\n<pre><code class=\"language-java\">LookupInBuilder builder = couchbase.bucket().lookupIn('customer123');\r\n<\/code><\/pre>\n<p>First up, we\u2019re creating a builder object that is primed with our customer\u2019s document. We can then perform the sub-document operations on that builder document.<\/p>\n<pre><code class=\"language-java\">builder = builder.get(\"addresses.delivery\");\r\nDocumentFragment results = builder.doLookup();\r\n<\/code><\/pre>\n<p>If we\u2019re using the sample JSON document from earlier in this post, <em>results<\/em> will be:<\/p>\n<pre><code class=\"language-JSON\">{\r\n  \"line1\": \"123 Any Street\",\r\n  \"line2\": \"Anytown \",\r\n  \"country\": \"United Kingdom\"\r\n}\r\n<\/code><\/pre>\n<p>We can simplify this query by chaining the whole thing together:<\/p>\n<pre><code class=\"language-java\">DocumentFragment results = couchbase.bucket().lookupIn('customer123')\r\n  .get(\"addresses.delivery\")\r\n  .doLookup();\r\n<\/code><\/pre>\n<p>As we build more complex queries and mutations, we can chain many operations together. In the Java SDK, <em>doLookup<\/em> denotes the end of the query and sends it for execution.<\/p>\n<p>As we saw in the instant messaging example earlier, we can also modify documents using the sub-document API.<\/p>\n<p>Let\u2019s say we want to change some parts of our customer\u2019s billing address. Back in Python, we could use the sub-document API to\u00a0do it like this:<\/p>\n<pre><code class=\"language-python\">import couchbase.subdocument as SD\r\ncb.mutate_in('customer123',\r\n             SD.upsert('billing.line1', '123 Main St'),\r\n             SD.upsert('billing.line2', 'Somewhere'))\r\n<\/code><\/pre>\n<p>Just as in Java, we first select the document by its key and then perform a series of operations on its contents.<\/p>\n<h2>Next steps<\/h2>\n<p>For the detail of how to use the sub-document API in your preferred language, check out the updated SDK documentation.<\/p>\n<p>You can also read Mark\u2019s post, coming soon, that goes into more detail of using the sub-document API.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What separates a document store from a key-value store? A document database can query and manipulate the contents of what it stores, whereas the value remains an opaque mystery to the key-value store. With Couchbase Server 4.5, we\u2019ve introduced our [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1812],"tags":[],"ppma_author":[8982],"class_list":["post-2172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n1ql-query"],"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>Sub-documents: find and change only what you need - 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\/sub-documents-change-only-what-you-need-to\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sub-documents: find and change only what you need\" \/>\n<meta property=\"og:description\" content=\"What separates a document store from a key-value store? A document database can query and manipulate the contents of what it stores, whereas the value remains an opaque mystery to the key-value store. With Couchbase Server 4.5, we\u2019ve introduced our [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-24T09:37:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-04T09:31:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/\"},\"author\":{\"name\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/6c3060a94353df62a71d4672b3454555\"},\"headline\":\"Sub-documents: find and change only what you need\",\"datePublished\":\"2016-02-24T09:37:31+00:00\",\"dateModified\":\"2019-03-04T09:31:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/\"},\"wordCount\":842,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/\",\"name\":\"Sub-documents: find and change only what you need - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-02-24T09:37:31+00:00\",\"dateModified\":\"2019-03-04T09:31:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sub-documents: find and change only what you need\"}]},{\"@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\/6c3060a94353df62a71d4672b3454555\",\"name\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/b1bc555cd9166b46d6063003c3b92317\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g\",\"caption\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\"},\"description\":\"Matthew Revell is a Lead Dev Advocate, EMEA Couchbase. He developed a global strategy for putting Couchbase front in the minds of the product's developers.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/matthew-revell\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Sub-documents: find and change only what you need - 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\/sub-documents-change-only-what-you-need-to\/","og_locale":"en_US","og_type":"article","og_title":"Sub-documents: find and change only what you need","og_description":"What separates a document store from a key-value store? A document database can query and manipulate the contents of what it stores, whereas the value remains an opaque mystery to the key-value store. With Couchbase Server 4.5, we\u2019ve introduced our [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-02-24T09:37:31+00:00","article_modified_time":"2019-03-04T09:31:48+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/"},"author":{"name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/6c3060a94353df62a71d4672b3454555"},"headline":"Sub-documents: find and change only what you need","datePublished":"2016-02-24T09:37:31+00:00","dateModified":"2019-03-04T09:31:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/"},"wordCount":842,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/","url":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/","name":"Sub-documents: find and change only what you need - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-02-24T09:37:31+00:00","dateModified":"2019-03-04T09:31:48+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/sub-documents-change-only-what-you-need-to\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Sub-documents: find and change only what you need"}]},{"@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\/6c3060a94353df62a71d4672b3454555","name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/b1bc555cd9166b46d6063003c3b92317","url":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g","caption":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase"},"description":"Matthew Revell is a Lead Dev Advocate, EMEA Couchbase. He developed a global strategy for putting Couchbase front in the minds of the product's developers.","url":"https:\/\/www.couchbase.com\/blog\/author\/matthew-revell\/"}]}},"authors":[{"term_id":8982,"user_id":18,"is_guest":0,"slug":"matthew-revell","display_name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g","author_category":"","last_name":"Revell","first_name":"Matthew","job_title":"","user_url":"","description":"Matthew Revell is a Lead Dev Advocate, EMEA Couchbase. He developed a global strategy for putting Couchbase front in the minds of the product's developers."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2172","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\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2172"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2172"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}