{"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_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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}},"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 v27.3 - 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_featured_media_url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/07\/SmJYeZ0r_400x400.png","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":453,"url":"https:\/\/wade.one\/blog\/2010\/02\/26\/phpuk2010-part-2-mysql-stuff\/","url_meta":{"origin":938,"position":0},"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":1},"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":437,"url":"https:\/\/wade.one\/blog\/2010\/01\/31\/mysql-and-binary16-the-reasonsbenefitsdrawbacks-mysql\/","url_meta":{"origin":938,"position":2},"title":"MySQL and Binary(16) &#8211; The Reasons\/Benefits\/Drawbacks (#mysql)","author":"Wade","date":"January 31, 2010","format":false,"excerpt":"I recently posted an article about using BINARY(16) for storing MD5's as unique identifiers instead of simple integer ID's (usually auto increment); in that article I touched on one of the benefits, reducing JOIN's, but there are other reasons for doing it too, so I thought I'd post an article\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":1118,"url":"https:\/\/wade.one\/blog\/2023\/03\/26\/expanding-on-performance-of-redis-vs-mongodb-for-a-push-pull-system\/","url_meta":{"origin":938,"position":3},"title":"Expanding on performance of Redis vs MongoDB for a push\/pull system","author":"Wade","date":"March 26, 2023","format":false,"excerpt":"When it comes to building a push\/pop system, both Redis and MongoDB can be used as effective solutions. However, there are a few key differences between these two databases that can impact which one you choose for your system. Redis is an in-memory data structure store that can be used\u2026","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":[]},{"id":629,"url":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/","url_meta":{"origin":938,"position":4},"title":"Using Amazon EC2 with C# .net","author":"Wade","date":"October 15, 2012","format":false,"excerpt":"Amazon's EC2 platform has a very in-depth console which allows you to do a lot, but what if you want to automate some of the processes or handling servers? I've been working with EC2 a lot recently and automating server starting\/stopping based on parameters of the system we use here\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":1106,"url":"https:\/\/wade.one\/blog\/2023\/03\/26\/google-bard-php-developer-viewpoint\/","url_meta":{"origin":938,"position":5},"title":"Google Bard &#8211; PHP developer viewpoint","author":"Wade","date":"March 26, 2023","format":false,"excerpt":"So I asked Bard to give me a reason to help me as as PHP developer then digged in to each point. Here's the answers and when I tried: Bard can help a PHP developer in a number of ways, including (wht: Code generation:\u00a0Bard can generate code in a variety\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/wade.one\/blog\/category\/ai\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_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}]}}