{"id":938,"date":"2015-07-06T12:04:25","date_gmt":"2015-07-06T12:04:25","guid":{"rendered":"https:\/\/wade.one\/blog\/?p=938"},"modified":"2015-07-06T12:04:25","modified_gmt":"2015-07-06T12:04:25","slug":"cloudant-ibm-query-indexing-arrays-directly-using-erlang","status":"publish","type":"post","link":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/","title":{"rendered":"Cloudant (IBM) Query &#8211; Indexing arrays directly using Erlang"},"content":{"rendered":"<p>Really short post this one on indexing using <a href=\"https:\/\/docs.cloudant.com\/cloudant_query.html\" target=\"_blank\">Cloudant Query<\/a>\u00a0to index arrays in your document, e.g. documents that have a field like this:<\/p>\n<pre>{\r\n  \"ids\": [\r\n    \"alpha\",\r\n    \"bravo\",\r\n    \"charlie\"\r\n  ]\r\n}<\/pre>\n<p>I was reading the documentation and just could not get it to index these items using anything but the default _all_docs indexer (don&#8217;t use this for large databases!) but then I came across the <a href=\"https:\/\/github.com\/cloudant\/mango\" target=\"_blank\">source code for Mango<\/a> and hidden in the tests and the implementation was the answer I needed.<\/p>\n<p>To create an index, as the documentation states, you just need to POST to \/dbname\/_index with something like:<\/p>\n<pre>{\r\n  \"type\": \"text\",\r\n  \"index\": {\r\n    \"default_analyzer\": \"keyword\",\r\n    \"fields\": [\r\n      {\"name\": \"ids\", \"type\": \"string\"}\r\n    ]\r\n  }\r\n}<\/pre>\n<p>However, if you try this for an array and perform a search (POST to \/dbname\/_find {&#8220;selector&#8221;:{&#8220;ids&#8221;:&#8221;alpha&#8221;}}) you&#8217;ll get no results! So how do you do it? Ridiculously simply, just change <em>ids<\/em> to <em>ids.[]<\/em>:<\/p>\n<pre>{\r\n  \"type\": \"text\",\r\n  \"index\": {\r\n    \"default_analyzer\": \"keyword\",\r\n    \"fields\": [\r\n      {\"name\": \"ids.[]\", \"type\": \"string\"}\r\n    ]\r\n  }\r\n}<\/pre>\n<p>The query however isn&#8217;t just <em>&#8220;ids&#8221;: &#8220;alpha&#8221;<\/em>, it&#8217;s a bit more complex, not much, but a bit: <em>{&#8220;selector&#8221;:{&#8220;ids&#8221;:{&#8220;$elemMatch&#8221;:{&#8220;$eq&#8221;:&#8221;alpha&#8221;}}}}<\/em>.<\/p>\n<p>There may be a better way (without writing your own function(doc){index(&#8220;&#8221;);&#8230;}) but for now, this works and uses native Erland as opposed to Javascript.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Really short post this one on indexing using Cloudant Query\u00a0to index arrays in your document, e.g. documents that have a field like this: { &#8220;ids&#8221;: [ &#8220;alpha&#8221;, &#8220;bravo&#8221;, &#8220;charlie&#8221; ] } I was reading the documentation and just could not get it to index these items using anything but the default _all_docs indexer (don&#8217;t use &#8230; <a href=\"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &#8220;Cloudant (IBM) Query &#8211; Indexing arrays directly using Erlang&#8221;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":939,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[13],"tags":[],"class_list":["post-938","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Cloudant (IBM) Query - Indexing arrays directly using Erlang - wade.one<\/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:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cloudant (IBM) Query - Indexing arrays directly using Erlang - wade.one\" \/>\n<meta property=\"og:description\" content=\"Really short post this one on indexing using Cloudant Query\u00a0to index arrays in your document, e.g. documents that have a field like this: { &quot;ids&quot;: [ &quot;alpha&quot;, &quot;bravo&quot;, &quot;charlie&quot; ] } I was reading the documentation and just could not get it to index these items using anything but the default _all_docs indexer (don&#8217;t use ... Read More &quot;Cloudant (IBM) Query &#8211; Indexing arrays directly using Erlang&quot; &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/\" \/>\n<meta property=\"og:site_name\" content=\"wade.one\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-06T12:04:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/07\/SmJYeZ0r_400x400.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Wade\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wadewomersley\" \/>\n<meta name=\"twitter:site\" content=\"@wadewomersley\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wade\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/\"},\"author\":{\"name\":\"Wade\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/f9dedd948575256e77a44aa1417f63de\"},\"headline\":\"Cloudant (IBM) Query &#8211; Indexing arrays directly using Erlang\",\"datePublished\":\"2015-07-06T12:04:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/\"},\"wordCount\":193,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\"},\"image\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/07\\\/SmJYeZ0r_400x400.png\",\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/\",\"name\":\"Cloudant (IBM) Query - Indexing arrays directly using Erlang - wade.one\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/07\\\/SmJYeZ0r_400x400.png\",\"datePublished\":\"2015-07-06T12:04:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/07\\\/SmJYeZ0r_400x400.png\",\"contentUrl\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/07\\\/SmJYeZ0r_400x400.png\",\"width\":400,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2015\\\/07\\\/06\\\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wade.one\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cloudant (IBM) Query &#8211; Indexing arrays directly using Erlang\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/\",\"name\":\"wade.one\",\"description\":\"wade womersley - york based software engineer\",\"publisher\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wade.one\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\",\"name\":\"Wade Womersley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"contentUrl\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"width\":202,\"height\":200,\"caption\":\"Wade Womersley\"},\"logo\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/f9dedd948575256e77a44aa1417f63de\",\"name\":\"Wade\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg\",\"caption\":\"Wade\"},\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/author\\\/wade\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cloudant (IBM) Query - Indexing arrays directly using Erlang - wade.one","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:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/","og_locale":"en_GB","og_type":"article","og_title":"Cloudant (IBM) Query - Indexing arrays directly using Erlang - wade.one","og_description":"Really short post this one on indexing using Cloudant Query\u00a0to index arrays in your document, e.g. documents that have a field like this: { \"ids\": [ \"alpha\", \"bravo\", \"charlie\" ] } I was reading the documentation and just could not get it to index these items using anything but the default _all_docs indexer (don&#8217;t use ... Read More \"Cloudant (IBM) Query &#8211; Indexing arrays directly using Erlang\" &raquo;","og_url":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/","og_site_name":"wade.one","article_published_time":"2015-07-06T12:04:25+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/07\/SmJYeZ0r_400x400.png","type":"image\/png"}],"author":"Wade","twitter_card":"summary_large_image","twitter_creator":"@wadewomersley","twitter_site":"@wadewomersley","twitter_misc":{"Written by":"Wade","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/#article","isPartOf":{"@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/"},"author":{"name":"Wade","@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/f9dedd948575256e77a44aa1417f63de"},"headline":"Cloudant (IBM) Query &#8211; Indexing arrays directly using Erlang","datePublished":"2015-07-06T12:04:25+00:00","mainEntityOfPage":{"@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/"},"wordCount":193,"commentCount":0,"publisher":{"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3"},"image":{"@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/#primaryimage"},"thumbnailUrl":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/07\/SmJYeZ0r_400x400.png","articleSection":["Programming"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/","url":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/","name":"Cloudant (IBM) Query - Indexing arrays directly using Erlang - wade.one","isPartOf":{"@id":"https:\/\/wade.one\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/#primaryimage"},"image":{"@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/#primaryimage"},"thumbnailUrl":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/07\/SmJYeZ0r_400x400.png","datePublished":"2015-07-06T12:04:25+00:00","breadcrumb":{"@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/#primaryimage","url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/07\/SmJYeZ0r_400x400.png","contentUrl":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/07\/SmJYeZ0r_400x400.png","width":400,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/wade.one\/blog\/2015\/07\/06\/cloudant-ibm-query-indexing-arrays-directly-using-erlang\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wade.one\/blog\/"},{"@type":"ListItem","position":2,"name":"Cloudant (IBM) Query &#8211; Indexing arrays directly using Erlang"}]},{"@type":"WebSite","@id":"https:\/\/wade.one\/blog\/#website","url":"https:\/\/wade.one\/blog\/","name":"wade.one","description":"wade womersley - york based software engineer","publisher":{"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wade.one\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3","name":"Wade Womersley","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","contentUrl":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","width":202,"height":200,"caption":"Wade Womersley"},"logo":{"@id":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png"}},{"@type":"Person","@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/f9dedd948575256e77a44aa1417f63de","name":"Wade","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg","caption":"Wade"},"url":"https:\/\/wade.one\/blog\/author\/wade\/"}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1434,"url":"https:\/\/wade.one\/blog\/2026\/10\/15\/read-the-postgresql-query-plan-before-adding-another-index\/","url_meta":{"origin":938,"position":0},"title":"Read the PostgreSQL Query Plan Before Adding Another Index","author":"Wade","date":"October 15, 2026","format":false,"excerpt":"When a database query gets slow, adding an index is an appealingly concrete thing to do.","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1513,"url":"https:\/\/wade.one\/blog\/2026\/11\/21\/large-json-ids-should-survive-the-trip-to-the-browser\/","url_meta":{"origin":938,"position":1},"title":"Large JSON IDs Should Survive the Trip to the Browser","author":"","date":"November 21, 2026","format":false,"excerpt":"An identifier can be stored correctly in the database and still lose precision on its way through a JavaScript client.","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1445,"url":"https:\/\/wade.one\/blog\/2026\/10\/26\/request-ids-are-useful-when-they-survive-the-whole-journey\/","url_meta":{"origin":938,"position":2},"title":"Request IDs Are Useful When They Survive the Whole Journey","author":"","date":"October 26, 2026","format":false,"excerpt":"A request ID in one log line is useful.","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":453,"url":"https:\/\/wade.one\/blog\/2010\/02\/26\/phpuk2010-part-2-mysql-stuff\/","url_meta":{"origin":938,"position":3},"title":"#PHPUK2010 Part 2 (MySQL stuff)","author":"Wade","date":"February 26, 2010","format":false,"excerpt":"Just picked up a nice tid-bit on creating a unique index on a two column table where the values in each column may be either way around but you only ever want one instance of the value in that row. So what this means is, inserting 2,1 and 1,2 for\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":431,"url":"https:\/\/wade.one\/blog\/2010\/01\/29\/mysql-binary16-and-scalability\/","url_meta":{"origin":938,"position":4},"title":"MySQL &#8211; Binary(16) and scalability","author":"Wade","date":"January 29, 2010","format":false,"excerpt":"Over the past few months at work, we've seen our database grown from silly big to really silly big, it's still a way to go to get to the size of the big boys such as Facebook etc. but it's still a database stored in MySQL that most day-to-day PHP\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1328,"url":"https:\/\/wade.one\/blog\/2026\/05\/31\/php-8-5-array-first-and-array-last-remove-tiny-annoying-helpers\/","url_meta":{"origin":938,"position":5},"title":"PHP 8.5 array_first and array_last Remove Tiny Annoying Helpers","author":"Wade","date":"May 31, 2026","format":false,"excerpt":"PHP 8.5's array_first and array_last are small additions, but they remove helper functions most PHP codebases already reinvent.","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/wade.one\/blog\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/07\/SmJYeZ0r_400x400.png","_links":{"self":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/comments?post=938"}],"version-history":[{"count":1,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/938\/revisions"}],"predecessor-version":[{"id":940,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/938\/revisions\/940"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/media\/939"}],"wp:attachment":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/media?parent=938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/categories?post=938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/tags?post=938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}