<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Noah Conley on Medium]]></title>
        <description><![CDATA[Stories by Noah Conley on Medium]]></description>
        <link>https://medium.com/@noahkconley?source=rss-a9e69b98895b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Woi5rcELgBWSbhAMSuVo6A.jpeg</url>
            <title>Stories by Noah Conley on Medium</title>
            <link>https://medium.com/@noahkconley?source=rss-a9e69b98895b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 23:02:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@noahkconley/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Your AI Product Delivers Magic, But Can You Explain It?]]></title>
            <link>https://medium.com/@noahkconley/your-ai-product-delivers-magic-but-can-you-explain-it-b49791b5ba3f?source=rss-a9e69b98895b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b49791b5ba3f</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Noah Conley]]></dc:creator>
            <pubDate>Thu, 15 May 2025 21:02:52 GMT</pubDate>
            <atom:updated>2025-05-15T21:02:52.546Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_caZUdkW1QL1vyTUhTtCRQ.png" /></figure><p>The rapid advancements in Large Language Models (LLMs) have unlocked unprecedented opportunities for product development, enabling features that were previously years of R&amp;D away or simply not feasible. I use them for everyday tasks like helping me come up with recipes when cooking and figuring out how to fix things around my house. For these low-stakes personal uses, where general guidance trumps precise data, it’s not a big deal when I get colorful context I didn’t ask for, or incorrect information because of how I asked the question. However, when it comes to an enterprise-level product that companies are paying thousands or hundreds of thousands of dollars a year to use, <strong>awareness of the ‘black box’ nature of these LLMs becomes critical.</strong></p><p>You’re probably already familiar with the term “black box”, but if you aren’t, <strong>it’s a system that can only be viewed in terms of its inputs and outputs.</strong> While users are often unaware of the inner workings of software, what makes AI black boxes particularly challenging is that even their creators may not fully understand the reasoning behind their outputs. That means when something goes wrong, when the results don’t match what’s expected, or when the input is too novel to be handled properly, it’s very hard to diagnose and fix the issue.</p><blockquote><strong>Using a black box in an enterprise-level tool can be risky and, in some cases, irresponsible.</strong></blockquote><p>As an example of the challenges and opportunities presented by LLMs, I led a project last year to significantly reduce, ideally eliminate, the onboarding costs for new customers.</p><p>New customers often had dozens of documents, ranging from a few pages to over a hundred. To get value out of our product, the customer would pay for a contract lawyer to go through each document to highlight text, write out a name and description for the selection, tag it with categories, and group the selection with similar ones from other documents. That’s a huge, costly time suck that we wanted to reduce, if not eliminate.</p><p>We achieved this using LLMs, and the results were remarkable. Within six months, we had halved the processing time of shorter, simpler documents. For larger, more complex documents, over a day of work was reduced to an hour.</p><blockquote><strong>Overall, our customers were collectively saving millions in consultant fees.</strong></blockquote><p>We still experienced some failures, but in most cases, the team was able to diagnose the issue and release an update within one to two days. The stakeholders were thrilled.</p><p>Part of this process of working with LLMs is understanding what they can do and what they can’t. Right off the bat, it was easy to figure out that we couldn’t take a document uploaded to our system, send it to an LLM, and get the results back that we were looking for. Most LLMs at the time of writing don’t process PDF or Word documents, and the amount of time and memory that would be required to perform an operation like this would be astronomical. We would need to break the process down into pieces: extract the text from the document, clean it up, split it into digestible chunks, and process those chunks individually. Throughout this process, <strong>we make dozens of calls to LLMs to classify or extract information.</strong></p><p>But we know that LLMs and the utilization of AI will continue to advance, processing power and time needed to make complex things happen will go down, and they will be able to act as agents, perform entire sequences of events on their own without any intervention from an external source. Would we eventually want to pursue implementing a process that takes a document and gives us all the results?</p><blockquote><strong>I would argue, no, we wouldn’t want to do that.</strong></blockquote><p>You might be asking, “Why not?” Let’s go back to what I said before about black boxes: if a document is uploaded but no results are generated, or they’re all garbled, or some come out perfectly while others are incorrect, how do we address that? Do we try again and see if we get the proper results? Do we tweak our input in hopes of a better result? Do we even know what went wrong, and where in the process it happened? In this imagined scenario, maybe the output would be able to include that information, <strong>but it’s far more likely that we would be guessing.</strong></p><p>The process we built is very resilient. The prompts for all our LLM calls are fairly simple classification, extraction, or summarization tasks, and they all expect simple, predictable response structures. <strong>We always include a confidence score and reason in the response, and we log everything. </strong>Because the document is divided into chunks, we can retry individual failures, diagnose issues by reading the logs, and make improvements to handle novel data.</p><p>So it’s not a black box, but it’s not a perfect process either. When there are failures, it could mean the entire document can’t be processed automatically until the issue is resolved. The very nature of us using LLMs means that there are multiple, much smaller black boxes within our process, and occasionally, we get results that we don’t want.</p><blockquote>This process was built to be able to handle situations like this, to be flexible and robust.</blockquote><p>The allure of a fully automated, AI-driven future is undeniable. However, for the software we craft and the products our customers depend on, relinquishing control entirely carries significant risks. Maintaining clear touchpoints for logging progress, implementing robust alerting for inevitable failures, and designing modular systems that allow for targeted adjustments are not just best practices — they are fundamental responsibilities in building reliable and trustworthy AI-powered products.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b49791b5ba3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Search 2.1: Pinpointing the challenges and complexities of filters]]></title>
            <link>https://medium.com/yello-offline/search-2-1-pinpointing-the-challenges-and-complexities-of-filters-add517a5aa72?source=rss-a9e69b98895b------2</link>
            <guid isPermaLink="false">https://medium.com/p/add517a5aa72</guid>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[search-engines]]></category>
            <dc:creator><![CDATA[Noah Conley]]></dc:creator>
            <pubDate>Tue, 20 Feb 2018 15:31:00 GMT</pubDate>
            <atom:updated>2018-02-20T22:05:31.371Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ViBzvA-M2ZjQ5geX4R0oA@2x.jpeg" /><figcaption>photo by <a href="https://www.instagram.com/vivid_cafe_cinematography/">Aleksejs Bergmanis</a></figcaption></figure><p>This article is a follow up and expansion on my <a href="https://medium.com/yello-offline/how-elasticsearch-changed-the-way-i-think-about-search-engines-twice-149331b1439d">previous article</a>, where I shared my experience revamping search with new strategies and technologies.</p><p>I’ve been writing code since I was 8 years old. As I was growing up, other things came up as professions I might want to pursue, but in the end it was easy to choose software engineering. But before I wrote code, I built train tracks. I was one of those kids who was super into Thomas the Tank Engine, and I had a ton of wooden tracks that I would lay out in intricate patterns and leave out for months on my bedroom floor. It had to be complete; I would completely rebuild it if I couldn’t get two pieces to connect naturally.</p><p>As I got older, trains were still fascinating, but I began to think more about what goes into planning a real train track: the existing structures and terrain that either have to be planned for, where the track will be most and least useful, and how to anticipate where future improvements and expansions can be made. Understanding all that was pretty cool, but then I saw how much more complicated it was for roads and highways. Train tracks have a single purpose: enable trains to move cargo from somewhere to somewhere else. That can be people, animals, oil, whatever. Anything that goes on the track has to have wheels that will fit between the rails, it has to be able to stop and start, move forwards and backwards, and that’s about it. Highways let everyone on it choose when and where they want to get on and off. They can drive faster on highways than on regular streets, and more people can drive side-by-side, meaning the throughput is much higher. Rather than getting some things from somewhere to somewhere else, highways attempt to get anything from anywhere to anywhere else. The increase in opportunity for success expands the room for failure just as much. We’ve all been on good highways and bad, we know the difference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ypxTIV5C0iQ2pKJLnapY3A.jpeg" /><figcaption>Jillian Schantz Patrick for KUT News, 2013</figcaption></figure><h4>Making Pinpoint Filters robust</h4><p>What do train tracks and highways have to do with HR tech? Not much, but the project I’ve been working on for the past year, now called Pinpoint Filters, makes for a good analogy to both. Yello has had some fairly robust search capabilities for some time, but with some very serious limitations. Some examples: when searching for candidates, you had the option to see those created on a specific date, date range, or with a common range such as Today, This Month etc, but you couldn’t create and save a search that would always look for candidates added in the last 3 days. You could see candidates who had applications to any selected job, but if you wanted to search for candidates who had an application to any job, or any except for a specific one, you’d have to select all, or all but one, jobs from the list provided. You could search for keywords, such as “product designer”, on a candidate’s resume, but if the keyword you were looking for wasn’t in their resume, but was on their profile as an answer to a field like “Area of Interest”, you would need to add a filter for that field specifically with the same keyword search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rLPKiH1AvpdUoL-5aqzcpA.png" /><figcaption>“I want to see candidates added since a week ago today”</figcaption></figure><p>What was once a small toolbox has become a full-blown workbench, full of different ways to find exactly what you’re looking for. But adding all that complexity enabled us to make a lot of mistakes, or at least be confused about things, that weren’t possible before. To use an example from above, if we’re looking for all the candidates who don’t have job applications to the role of Product Designer, do we want to include those candidates who don’t have any applications? What about candidates who have an application to the Product Designer role and the Marketing Designer role? When we’re searching for keywords on the candidate’s profile, how do we include keywords from choices on a single- or multiple-select field, which are only stored as references on the user’s answer data? How do we make sure the correct results are returned, even if the search is run using a different language than the one the candidate used to respond to the question?</p><p>Some of these questions, and many others like them, were asked as we were coming up with the original design, some were asked as we were building and testing the new features, and some came up as questions when end users began trying the new search expereince. Answering some of these questions was as easy as changing the verbiage of an operator or a response message, some required some serious reengineering of the filter process. A small few we haven’t been able to answer definitely yet. The current implementation performs a “correct” behavior, but we don’t know if it’s correct for everyone. This became even more true when combining filters. Two filters that have a certain behavior in isolation should be modified when in complemented with related filters: looking for candidates who attended a specific event should not include candidates who <strong>attended </strong>a different event, but were only <strong>invited</strong> to the event specified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7mC5MsRKEkIyZYzRGsd_Pg.png" /><figcaption>“I want to see all candidates invited or scheduled for events, except for one specific event”</figcaption></figure><p>Adding these new operators allowed us to expand our understanding of our own data, including where we were missing information that could be helpful, or where older features had flaws that hadn’t been uncovered in development, testing, or everyday use of the feature. I don’t mean to say those features were broken or insufficient at the time, but not good enough for the new capabilities. This is where new projects bleed into old ones, allowing for refactoring, and sometimes totally rebuilding, something in order to make it more compatible with the new material. This can’t happen all the time, we’re limited in the capacity of what we can change or adapt, but we try to make those changes wherever we can raise the bar significantly on what came before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p9Uj_49HmS9o5g6slCk56Q.jpeg" /><figcaption>photo by <a href="https://instagram.com/gotocalifornia/">Taras Makarenko</a></figcaption></figure><h4>Making Pinpoint Filters fast</h4><p>Performance of the search page overall was another big area we wanted to improve upon during this project. In order to speed up the performance, we made some significant design changes that make search a very different experience. The original search page loaded all the search data and the first page of results in the initial loading of the page. This includes all options for all filters for all categories. For some clients, that’s an extraordinarily large amount of data, and so the initial page load would take a long time, or sometimes time out. We broke up the requests to provide the data that was needed when it was needed. This made the page load lightning fast, but made certain actions take longer than before because the data needed to be retrieved. As a result, we’re in the process of making another change: we load the page structure with no results, then fetch a significant amount of data after the page is loaded. This will allow for some actions to be taken as soon as the page is loaded, and many more soon after with few additional load times.</p><p>Another thing we noticed is that nothing was happening on the page while these requests were processing, which didn’t make for a great experience. Because of this, we working on a more reactive page that responds to interaction with feedback. This feedback, whether it’s a color change, animation, message, or something else, is incredibly helpful to let the user know something is happening, and makes waiting easier. It’s amazing how much better something as small is a spinner is better than nothing at all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q8nhjKRTAWZPIAS6m0fyag.jpeg" /><figcaption>source: <a href="https://pixabay.com/en/navigation-car-drive-road-gps-1048294/">pixabay.com</a></figcaption></figure><h4>Making Pinpoint Filters easy</h4><p>As I said above, some design changes were made with the goal of freeing up space on the page and making aspects of the search experience more focused. The old search page was very cluttered, which could make finding exactly what you were looking for difficult. The filters were on the left of the page, and the results were on the right, with the ability to pick your saved search and view templates above each section respectively. We moved the filters and saved searches into a single flyout, and the view setup into another one. These would only show when needed, and allow the user to focus on the results or the flyouts one at a time. This change requires more clicks, but our hope was that this would be a better experience, especially once users got used to the change.</p><p>Another design choice was to make viewing archived data a separate operation. For the most part, our users don’t spend much time looking at archived data, and in the old index, an unarchived filter was included by default. It wasn’t shown to the user until they changed the filter, and it allowed you to select “archived”, “unarchived”, both, or neither (which was treated the same as both. We moved the ability to see archived data into the settings panel, which allowed us to also provide a different set of batch actions when the user chose to view archived data. This is a dramatic departure from the old search paradigm, but we believe the old method had too much room for confusion.</p><h4>What’s next?</h4><p>We have a long to do list, both to add new things and fix old things. With a product as diverse and varied as Yello Enterprise, all of our engineers have opportunities to work on different features and tools. My goal from the start was to build Pinpoint Filters in such a way that any dev could come in and start tinkering with it, so I hope we’ve been able to do that. My team’s next few projects will be in the same sphere as search, but with a lot more action capabilities, so I’m excited to get started making it easier to find the right people for the job.</p><p>Now that you’ve gotten this far, please leave a clap or a comment, and check out other stories from <a href="https://medium.com/yello-offline">Yello Offline</a>. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=add517a5aa72" width="1" height="1" alt=""><hr><p><a href="https://medium.com/yello-offline/search-2-1-pinpointing-the-challenges-and-complexities-of-filters-add517a5aa72">Search 2.1: Pinpointing the challenges and complexities of filters</a> was originally published in <a href="https://medium.com/yello-offline">Yello Offline</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How ElasticSearch changed the way I think about search engines… twice]]></title>
            <link>https://medium.com/yello-offline/how-elasticsearch-changed-the-way-i-think-about-search-engines-twice-149331b1439d?source=rss-a9e69b98895b------2</link>
            <guid isPermaLink="false">https://medium.com/p/149331b1439d</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Noah Conley]]></dc:creator>
            <pubDate>Fri, 20 Oct 2017 21:08:13 GMT</pubDate>
            <atom:updated>2017-10-23T20:02:00.454Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--IQLLpburPNXr7G7z2aGA.jpeg" /><figcaption>ckSource: <a href="https://pixabay.com/en/search-internet-online-web-browser-2041815/">pixabay.com</a></figcaption></figure><p>Allow me to set the scene to get us on the same wavelength. You’re on a website with a robust search page, let’s use Amazon in this example. How would you start if you’re trying to buy some new bedsheets? You could type “queen bed sheets” into the handy dandy search bar right at the top of the screen and find exactly what you’re looking for. Same goes for “tennis balls” or “rhcp vinyl”. What if you got a gift card for your birthday and you’re just browsing? You haven’t updated your baking tools in a while, so you go to the Kitchen &amp; Dining department, click Bakeware, and you decide it HAS to be blue, made of aluminum or stainless steel, and Prime eligible (always a must). With just a few clicks, you’ve managed to go from all Amazon has to offer, to a very specific subset of products.</p><p>In the first scenario, you, the potential customer, are using a query to match a search phrase to products using keyword matching. In the second, you’re filtering using boolean logic operators. These are the most common ways to search over a database, millions of other popular sites employ one or the other or both, but often it’s still hard to find exactly what you want unless a lot of time and effort has been put into it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*aOUHyGv_d4t0L92_0Fu3Cg.png" /><figcaption>Source: Yello Enterprise</figcaption></figure><p>At Yello, search is the most used tool for our web product for a variety of purposes. One of our essential products is a talent relationship management (TRM) service, where we enable companies to enter and track the jobs they have open, the candidates applying for them, the events where the candidates connect with the client, and all of the evaluations and other forms that get filled out in the interview process. The client is able to not only view candidate data based on the criteria, but also perform actions or batch actions on those candidates and export reports directly from the built in search engine. In order for recruiters, interviewers, and HR managers to use our tools in the course of their work, the data they’re seeing needs to be accurate. That sounds obvious, but as many software developers know, relationships that seem clear on the web page may not be so clear in the database, and vice versa. In addition, any query on a SQL database that could potentially include millions of rows across up to a dozen tables carries with it the foreboding P.S. of “your site is about to crash due to running out of memory”. Enter ElasticSearch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5CdMwVHcMkl_jMWEDFoLaw.png" /><figcaption>A document of only the essential information isn’t useful for a lot of functionality, but it’s great for search</figcaption></figure><h4>ElasticSearch (you know, for search)</h4><p><em>What is ElasticSearch? What can it do that my SQL database can’t?</em></p><p>ElasticSearch is a distributed, NoSQL, document-based database and search engine. It excels at rapidly indexing, querying over, and aggregating millions of documents. If you haven’t heard of it before, you’ve heard of at least some of the many, many companies that use it, <a href="https://logz.io/blog/15-tech-companies-chose-elk-stack/">including Medium, Netflix, and Stack Exchange</a>. It’s built on the <a href="https://lucene.apache.org/">Apache Lucene</a> library, which includes a vast array of tools for text indexing and analyzation. A service like this can be used as a primary data store, but it makes the most sense if the data is of only a few different types with as few relationships as possible. It’s a great tool for a company like Medium. I’ve never seen Medium’s codebase, but I’m guessing there are a few data types (articles, users, publications, comments, maybe a couple more) and the relationships are simple and straightforward (person1 owns article1, article1 includes comment1, person2 follows person1, person2 owns comment1, publication1 includes person1 and person2 and article1, etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nfzyDlkBsP9dobKi5a8CvQ.png" /><figcaption>A search engine that can do everything can only do it one way and needs to know everything</figcaption></figure><p>For anyone who’s data is more complicated, ElasticSearch works better as secondary data store that sits on top of the primary database (in our case PostgreSQL) and has to be kept in sync whenever something updates in the Postgres database. That can be challenging to set up properly, but it divides the responsibilities to allow the tools to do the jobs they excel at, and suddenly that query that could have <em>(read “was going to”)</em> crash your site, now takes a fraction of second. If you want to learn how ElasticSearch does this, they have a great <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html">guide</a> that explains it better than I ever could, so I’ll move on to how my understanding of building a search engine evolved for the first time.</p><h4>A good search engine doesn’t care about the filters</h4><p><em>What does that mean? Shouldn’t the search engine care about what information is coming in so it can know what to do with it?</em></p><p>In a word, no. When I started working on Yello’s search engine, it was a hard coded process, where every kind of filter had a distinct method to convert it from a parameter passed in from the site to a query that ElasticSearch could understand. Any time a new filter was added, a new method had to be defined to convert it. In addition, all the default criteria had to be present and “empty”, which could be an empty array, an empty hash, an empty string, or just nil, and the display logic for displaying the filter information was unique per filter. Maintaining all of these filters was easy when the product was young with maybe twelve filters, but it’s much more challenging now that there are around a hundred <em>(not an exaggeration)</em>.</p><p><em>Sounds like a pretty big problem with a lot of potential bugs and inaccuracies. How does one go about solving it?</em></p><p>This was not the kind problem that could be solved all at once, and at the time I didn’t know enough about the project to make the kind of systemic changes that would be necessary to make a significant improvement, so I started by centralizing and streamlining the query generation process. This required a lot of time in the ElasticSearch <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html">query DSL</a> documentation. I wanted to make the queries as small and understandable as possible regardless of what filters were being applied, and make the process reusable for multiple pages. After several weeks of work I had reached the point of diminishing returns, but the search engine no longer cared what filters were being passed in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W0qjTfEBWygmiTKE8JTnNw.png" /><figcaption>When some of the processes are distributed, the search engine becomes more flexible</figcaption></figure><p><em>Smaller, more efficient, more readable, all great! Did it work?</em></p><p>To some extent, yes. However, a few months later, I came back to the search engine to find that a lot had been added to it, but not much had been done to make it better. At that time, a new feature was being asked for that wouldn’t be possible with the current setup, which gave us the opening we needed to propose rebuilding the search engine from the ground up. Our proposal was accepted, and we began the project that evolved my understanding of search engines the second time.</p><h4>A great search engine doesn’t care about the data</h4><p><em>Come on now, you’re telling me I’m searching for something, and the program doesn’t care what I’m searching for?</em></p><p>That’s exactly what I’m telling you. Remember that default list of empty filters I mentioned earlier? Why does the search process need to care about that? Why can’t the default be nothing? Also, why do all the filters need to have different names if they’re largely the same? Why are there so many “edge cases”? And why in our ElasticSearch indices do we have all this complex nesting for things we don’t actually sort on? Or for things you can find on another index?</p><p>The last two rhetorical questions allude to another huge flaw in our search process: the way we were mapping data from Postgres to ElasticSearch was inconsistent and naive. They were designed to emulate the object they were representing, but that really wasn’t useful. What we needed was a <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html">unified mapping</a> that would define clear expectations of what data would be included and what its data type would be. The mapping we used had many fields and extensive nesting to keep it all organized. What we needed was as few fields as possible, and at most one level of nesting. To do this, the document in ElasticSearch had to be drastically different from the Postgres object. In order to make the documents smaller, we did have to turn four different object types into six. The two additional ones had been embedded and distributed across the other four. This presented a problem: you can’t do joins across ElasticSearch indices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6fysHJ9Vt7bTDaE8qYz5sQ.png" /><figcaption>As the pieces are distributed, the search engine goes form a one-man-band to a symphony conductor</figcaption></figure><p><em>How to you filter on one index in order to get results from the other?</em></p><p>There are plugins designed to serve that purpose, but they don’t always work as expected. The better answer is that it can’t be done in a single query. That sounds bad, but fact of the matter is that often two or three very inexpensive queries can be a lot more efficient than one expensive query.</p><p><em>Great, so how many queries do you need then?</em></p><p>A lot actually, since we have several object types that have subtypes. Users can be Admins or Candidates. Forms can be Evaluations or Referrals or Assessments. We don’t need different mappings for the subtypes, so here we leverage <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html">aliases</a> to create default filters. Now the search engine doesn’t need to care what it’s looking for, it just takes the incoming data type and applies it as the search destination. This means some indices are queried multiple times.</p><p>Running all these queries in series wouldn’t take THAT long, but at the same time, we want to make the process as fast as possible. Fortunately, ElasticSearch has a built in function to perform <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html">multiple searches</a> simultaneously at a marginally lower cost than all the queries individually. This means for any given search, between one and three queries are executed, but up to twenty are actually being performed.</p><p><em>That sounds like a lot to keep track of at any given time…</em></p><p>It is a lot, but almost none of the rules are defined by the search engine. The context defines the order of search, what filters can be involved, and how the relationships get processed through the sort order. The different filter categories define any edge cases that close the gap between what the user sees on the page and how the data is represented. The filters themselves define how they should be converted to a query clause for ElasticSearch. The search engine has one job: follow all the rules.</p><p><em>Sounds like a lot of work has gone into it. So did it work?</em></p><p>So far, it’s worked very well indeed. It took more than six months to build out the process for a single search page, and then less than two months to make rules for two other pages, and we’re in the process of defining a fourth. I haven’t even mentioned all the ways we improved building filters from the search page, adding many more operators and a much clearer way to define boolean logic. Also, because this process doesn’t know that it’s for a search page, we can use it for any number of processes, such as reporting, statistics, and regionalization, just to name a few.</p><p><em>What’s next?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o5VixXW_lVKMbAeOfiLwgA.jpeg" /><figcaption>Photo by <a href="https://medium.com/u/a833450b230">Jonathan Simcoe</a></figcaption></figure><h4>The perfect search engine…</h4><p>…is something we’re constantly striving for, and we get closer every day thanks to the input we get from developers, product owners, client support, and even clients themselves. We’re currently experimenting with ways to make our engine faster and smarter. There’s still a lot that can be done to improve and future proof the search process, and many technologies to explore along the way.</p><p>If you enjoyed this dive into building a search engine, please leave a clap or a comment, and check out other stories from <a href="https://medium.com/yello-offline">Yello Offline</a>. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=149331b1439d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/yello-offline/how-elasticsearch-changed-the-way-i-think-about-search-engines-twice-149331b1439d">How ElasticSearch changed the way I think about search engines… twice</a> was originally published in <a href="https://medium.com/yello-offline">Yello Offline</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Make Everything Better All the Time]]></title>
            <link>https://medium.com/yello-offline/make-everything-better-all-the-time-a4dcbda5ff56?source=rss-a9e69b98895b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4dcbda5ff56</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Noah Conley]]></dc:creator>
            <pubDate>Mon, 11 Sep 2017 16:16:02 GMT</pubDate>
            <atom:updated>2017-09-11T16:16:02.091Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vv0HNvRhU0ihKVaBIpDUww.jpeg" /><figcaption>Via <a href="https://negativespace.co/wordpress-php-code-2">NegativeSpace</a></figcaption></figure><p>Test suites. Code smells. Style guides. Continuous Integration builds. <br>All of these tools are designed to do the same thing: prevent bugs. You didn’t need me to tell you that, nor do you need me to tell you that bugs are the archenemies of any and every developer. If you want to stop reading right now, that’s fine, but read this: Never surrender to the bugs!</p><p>If you’re still here, I want to share some of my experiences and observations on how to squash and avoid bugs. I’m not a super-expert, I don’t have a PhD or 40 years of building applications and websites on my resume, but I enjoy my work and love learning ways to do it better. So here we go!</p><h4>Break it like you mean it</h4><p>Many developers don’t have an appreciation for what it means to test a project they didn’t build themselves. One of my first jobs in the tech world was as a QA tester for a magazine company. I both followed and created test plans for iPad magazine apps that were being developed. Writing a test plan taught me how to look at a feature and outline what the actual expectation for it is. Following a test plan taught me how to look at a feature and the expected use cases, and then do everything I could to deviate from those expectations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*PnpAffQaCmGD-I44xgqDhw.gif" /><figcaption>Via blog.dilbert.com</figcaption></figure><p>When I started building features as a developer, I often noticed my work was being sent back to me by our QA team with bugs that weren’t found in our review process. In fact, this was happening for a lot of people on my team. This is not uncommon, but the problem was I’d have to stop the work I was doing to fix something I hadn’t worked on in days. It extended the lifecycle of a feature and all the features that followed. The lifecycle problem got a lot smaller when I started asking other developers to be the primary reviewer of my merge requests. This allowed me to find the obvious issues early, and get feedback from someone with an inside perspective on how the underlying code works.</p><h4>Please use your own keyboard</h4><p>Software is collaborative at its core, but almost all my time writing code has been on my own. This isn’t unusual when working with a familiar codebase to add a straightforward feature; pairing in those cases is pretty boring unless your partner is new to the project. When coding solo, I sometimes pick up new tricks or find issues along the way.</p><p>I’ve had a few opportunities to work on really challenging problems, where one person isn’t enough to think through the whole problem. Those kind of jobs have the highest risk of bugs, and having someone to catch mistakes, make suggestions, give reminders of goals or acceptance criteria, and share the workload makes it a dramatically better experience. Plus, some of the best tricks I’ve learned and shared were in the context of pairing, and who doesn’t like watching work get done without needing to touch the keyboard?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*SFii6xCKG4I72go7b8r37Q.png" /></figure><h4>Did I do that?</h4><p>Not every potential bug you find should be fixed as soon as you find it. In a big project, you’re likely to find yourself in places you’ve never been before looking at code that hasn’t been touched in a long time. I’ve been tempted into making changes I thought would be innocent visual changes, but turned out to cause big problems. What happened was I changed something without fully understanding what it was doing.</p><p>This can also be a problem for changes that don’t cause bugs also, because then your name is on a line of code inside of a feature you didn’t write. If someone has a question about it and they come to you, there’s not much you can do to help them understand the feature. Take the time to understand how it works, or learn it over time as you encounter it when building other features. Build test cases if they don’t exist. Design debt tickets and dedicated Project Improvement Time are great for this.</p><h4>What’s next?</h4><p>The bugs will never stop, but you can get better at recognizing them and their symptoms. It feels really good to build a piece of software that works perfectly when you run it. When that happens, try to break it. Ask someone else to break it. Check the places your feature connects to the rest of the project. Your team and your users will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4dcbda5ff56" width="1" height="1" alt=""><hr><p><a href="https://medium.com/yello-offline/make-everything-better-all-the-time-a4dcbda5ff56">Make Everything Better All the Time</a> was originally published in <a href="https://medium.com/yello-offline">Yello Offline</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>