Don’t Do Agile, Be Agile

At Webjet’s UnITed Conference, Lachlan McKerrow went through the history of the organisation’s 10-year agile journey, from being a siloed organisation practising waterfall processes for deploying monoliths, to having adaptive, constantly learning cross-functional teams, iteratively delivering microservices.

Pre-Agile

Before 2011, Webjet’s engineering team was set up much differently than how it is today. There were teams of developers, testers, and ITOps (plus a part-time Business Analysts) sitting in their own workspaces and there was little collaboration. The system was a monolith, know as TSA (Travel Service Aggregator), and deliverables were “thrown over the wall”. 

Programming was done solo. The process was regimented, and individuals followed the plan, with tech leaders and managers advising teams what to do. None of the staff asked questions. Designs were done in a closed room by management, and each mockup and specifications had to be signed-off by senior management. If mockup was wrong, it was slow to change. Things would sit on the shelf for long due to the hoops they had to go through.

Delivery was done over an 8 to 12-week cycle, a “Big Bang” with a batch of things being brought to production. Many times, if things went wrong, everything had to roll back, and there would be finger-pointing that ended with “that’s what you told me to do.” There was no accountability by individuals or teams.

It was a long and torturous process to go from development to production.

Trying Out Agile

In 2011, Webjet started trying out the agile way. By then, the team had 11 developers and 1.5 BA’s. The development teams were then reorganised, and divided into two streams: Scrum (for Project Contrail), with 5 in the Azure team, and Waterfall, with 4.5 developers in the TSA team, 1.5 in Apps, and 5 in ITOps, with some people having multiple roles.

The design process remained the same. It was still management-centred, done in a closed room, and each mock still had to be signed off by senior management.

The Azure team developed the flights path as a mobile site, and the TSA and ITOps teams kept the desktop site running. The release was on 8.5-week cycle. There were modest enhancements to the desktop site as there were fewer resources. From the process of delivering the mobile site, however, came some significant insights.

The First Ah-Ha Moment

In late 2012, early 2013, Contrail was the first attempt to put something into the cloud (through Azure), where Webjet was the first customer commercially signed by Microsoft. The development partner, Readify, was practising Scrum, and Webjet thought that this might be the way forward. The mobile site, unfortunately, didn’t go to production, as ITOps wasn’t involved. They couldn’t support it, and if something happened, they wouldn’t know how to fix it.

Scrum was trialled for one team, before getting others to do the same. This made development effort costly, but the learning was valuable.

How Webjet Was Organised

Going Agile

After learning from the Contrail project and the first attempt at Scrum, the teams were again reorganised. A dedicated product owner was brought on board. Two large development teams (named Snipers and Samurai, each with a Business Analyst) and a product support team (named SWAT) was established. Testers and ITOps remained in their separate teams. There was a 6-8 week delivery cycle for the monolith.

Production Support Daily Process

The teams got Professional Scrum Master training, and Scrum ceremonies (such as planning poker) were followed. There were visits to REA Group and Seek to see how they operated, and adopted some of their practices. There was a move away from Scrum to Lean, then to Kanban. The design was still management-centred, but the mocks didn’t have to be signed-off by senior management anymore. There was now an emphasis on user-centred design, with User eXperience expertise brought in. Feature toggles were introduced to allow code to be put live on production but turned off. 

DevOps role was then added to each team. New systems like Octopus (aka the Kraken, as it kept breaking things), Git, ARR, and TeamCity were installed. The “bus” (a concept borrowed from Seek) was created for the deployment of the monolith, scheduled weekly.

The outcome wasn’t very good. Planning meetings were hated, and no one wanted to go to them. Estimates were not accurate. There was sandbagging to make burndown charts look good by overestimating. No one wanted to rotate through the SWAT team. There was diffused accountability across teams. There were, however, reduced time on ceremonies and planning meetings.

As for the design process, adjusting for mock-up errors was easier, and the focus was now on the customer, something that the REA Group pointed out was key. The Pattern Library was introduced for consistency and ease of front-end development. 

For delivery, it was still a Big Bang delivery, with some rollbacks. Deployments gradually became easier, although they still had problems. However, when things went wrong, the focus was now on what’s needed to do to fix it rather than finger-pointing. The bus started to depart every 2 to 3 weeks.

The Second Ah-Ha Moment

In early 2016, the second major realisation is that Webjet was “doing” agile, but not “being” agile. It was a case of “monkey-see, monkey-do” with following practices and processes of agile without an understanding of why it works.

An Agile Coach was brought in to review, and Webjet was told that the practice of agile was fine, but like everyone, you can do better. What was missing was having better awareness and a deeper understanding of Agile’s 4 values and 12 principles from the Agile Manifesto. To be truly agile, it has to be inserted into the organisation’s DNA.

The Agile Manifesto

Being Agile

The teams were now reorganised into line-of-business cross-functional delivery teams, taking a cue from Spotify. Quality Assurance was now part of the same team, disbanding the test teams. DevOps moved from these teams and a Platform team was created. Responsibility for testing and deployment of microservices was fully with the delivery team, and ITOps was no longer involved in this process. There was an office redesign with collaborative workspaces. The organisation was organised into teams and guilds (grouped by roles). 

UI resources were attached to teams for a project instead of sitting inside the team. UX optimised workflows with the aid of user testing. UI and UX improved all booking paths through consistency (with the pattern library). There was a weekly cycle for monoliths, and a daily cycle for microservices.

The process kept on evolving, adapting to the needs of the organisation. The strengths of Kanban practices and Scrum sprints were brought together as “Webban”. Standups started with a report on production support issues by the rostered team member (which included Quality Assurance). Psychological safety was promoted to enhance the learning process. Servant leadership, where leaders support and guide instead of telling what to do, was adopted. Business Analyst’s asked the 5 Why’s to identify the actual problem and core value, and who the customer is.

There was a shift of quality to the left. Business and UX were doing the ideation and Business Analysts and Solution Architects joining to refine it. Product Backlog Items (PBIs) were written in Behavioural Driven Design (BDD) format (Given/When/Then format) and reviewed by Quality Assurance. Kick-off meetings were held. Hack Days were introduced to further encourage collaboration and bring down siloes in the office.

Quality Assurance took the role of bus drivers for the monolith. A guide to developing microservices was written, and Continuous Integration/Continuous Delivery (CI/CD) pipelines were made to work with development/production configuration from the get-go. Teams had to think of how to get “Hello World” to production, and only after this is done do they start writing feature code.

A Guide for Delivering and Deploying Microservices

As a result of all of this, teams have become more empowered, taking ownership and accountability. Team members developed T-shaped skillsets, having the breadth of knowledge to cover things when necessary, but having deep knowledge based on their roles.

For release, things were released iteratively. For example, for mobile search, the feature was first enabled only for one route, to see how customers behave, address problems, and assess the outcomes. If things went wrong in production, there was a calm, supportive approach to getting it sorted, with a Root Cause Analysis made to gain learning. This happened when Flights First was released to production on a Friday at 3pm with only a development config in place, not a production one. Holding off the release to Monday morning for more development environment testing wouldn’t have uncovered the issue.

The Third Ah-Ha Moment

The third major realisation, which came in mid-2019, is that there is no framework of agile that fully fits anyone and that the practice of Agile can’t stand still. It’s important to look around and see what is out there.

Being More Agile

In 2019, further refinement on agility came with the introduction of Vertical Slicing, introduced with Paper Planes and Elephant Carpaccio workshop by Alistair Coburn. The guide to deploying microservices was enhanced to emphasize getting value to the customers as early as possible. There were sessions on Pair Programming and the Heart of Agile

Heart of Agile

Business Analysts are designated as Delivery Drivers, responsible for bringing features to production. Cypress was introduced as a replacement for Hymie (our in-house automated testing system), bringing the full spectrum of automated testing to the individual teams.

Conclusion

A framework can’t be simply taken from another organisation, turn it into a template, and shoehorn it into process and practices. The approach is to look at what others have done and is found to be useful, and consider if it is a good fit for the company’s environment and culture, as well as letting go of old practices. It’s a constant evolution as teams, work, and business demands change, continually adapting the process. In all of these, always thinking of customers first.

The NoOps Bot, the Microsoft Bot Framework, and the Language Understanding Intelligent Service (LUIS)

During last February’s HackDay, the NoOps team delivered a prototype version of the NoOps Bot. The NoOps bot is a self-service system that allows an MS Teams user to issue simple commands to be performed by backend Platform services.

The system has two main components, the front-end conversational bot, which processes the messages, and the back-end plugin services, which perform the work requested by the user.

NoOps bot, accessed via the Bot Framework Emulator

The Microsoft Bot Framework

To develop the NoOps bot, we used the MS Bot Framework. It is a set of services, tools, and SDKs that provides a foundation for developers to build AI bots.

The following are the main components of the Bot service app.

  • Hosted in Azure, the Bot Connector Service allows the connection to channels (such as MS Teams) configured in the Azure portal.
  • The entry point to the bot service, the Bot Framework Adapter sends and receives activities to/from the Bot Connector Service. 
  • The Root Bot handles activities (information passed between the bot and the channel, such as a message or a new connection from a user) and runs dialogs.
  • Dialogs drive the sequence of interaction between the user and the bot, breaking it down into individual steps that display or receive messages (and connect to the Recognizer.)
  • The Recognizer takes messages and identifies intents by connecting to an Azure AI service, the Language Understanding Intelligent Service (LUIS).

Intents and Dialogs

For the HackDay version, the NoOps bot could process two types of requests: purge Cloudflare cache and recycle IIS application pool for our UAT site. The current version of NoOps can process an additional request: show the latest Webjet news (from Google news.)

Each of these requests is defined in the app as an intent, and each intent leads to a separate dialog, as they have varied interaction steps.

News Dialog. The news feature is a single-step process. Once the news intent is identified, it connects to Google News to retrieve an RSS feed and displays the top 5 news titles and links.

Recycle UAT Dialog. This is a two-step process. The bot confirms to the user whether he/she wishes to recycle UAT, presenting a yes/no prompt, and, if yes is clicked, proceeds to send an HTTP POST request to the Recycle UAT service.

Purge Cloudflare Cache Dialog. This has three steps. The bot prompts the user to provide the CDN resource to purge (separated by commas). Then, it confirms to the user whether he/she wishes to proceed (with a yes/no prompt similar to Recycle UAT), and if affirmative, proceeds to send an HTTP POST request to the Purge Cloudflare plugin service, providing the URLs in the payload.

These three dialogs do not require AI to go through their steps. In the future, there may be more intelligence required to perform more complex tasks. But for now, the main use of AI in the NoOps bot is understanding the initial input from the user, received by the Main Dialog, to determine the user’s intent from the natural language message entered. For this, the Bot interfaces with Azure’s Language Understanding Intelligent Service (LUIS).

Language Understanding Intelligent Service (LUIS)

LUIS is an Azure AI product for building and running natural language models. It takes an utterance (text input) and returns one or more intents, each with a score on how strong the utterance aligns with the language associated with the intent. If a score is too low, the Bot is configured to say that it does not understand the request.

The current NoOps model has three intents: News, Purge_CF, and TSA_Recycle_UAT. Each of these intents has a list of utterances that are used to train the AI to help it understand the text. LUIS also stores a history of messages it has received, including those it was unable to understand, and they can be used as inputs to add to the list and improve the model.

Bot Framework Composer

The current NoOps bot is built with Python. A future version may instead be built using the Bot Framework Composer. Instead of developing the dialogs through Python code, the Bot Framework Composer provides a graphical interface to represent the conversation flow, and generates the logic in a JSON format to be consumed by the Bot service. This makes it easier for teams to build their own bots.

Skills

Beyond simple dialogs, the Bot framework allows extension and reuse through skills. Skills are composable bots, each running as a separate service, that are linked to a central bot. This allows teams to maintain their own bots (as microservices) but are still all connected to one central channel. Microsoft has created a number of out-of-the-box skills that have productivity capabilities such as managing calendars, sending emails, or providing map information.

Possible Future Applications

The NoOps bot is but one of the many possible applications of the Bot Framework for WebJet. It is interesting to note that one of the samples in the Bot Framework SDK tutorial is Flight Booking. Bot frameworks like the MS Bot Framework are an alternative to packaged AI chatbot solutions. With the recent spike of LivePerson use due to travel bans, it can someday also be able to help reduce the load of Customer Centre, and provide great value to Webjet and its customers.

Since the release of NoOps Bot, we have received a number of feature requests, with a few posing some implementation challenges.

Retail banks wake up to digital lending this year

Overview

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Consulting represents success at realizing the company is going in the wrong direction. The only time the company fails is when it is not possible to do a turnaround anymore. We help companies pivot into more profitable directions where they can expand and grow. It is inevitable that companies will end up making a few mistakes; we help them correct these mistakes.

Problems

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Solution

Suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

0 %
Increase Integration
0 %
Business Growth
0
Number of Sales

What Client Say

“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Robert Brown
Business Owner
“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Ruko Bendo
Business Owner

Within the construction industry as their overdraft

Overview

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Consulting represents success at realizing the company is going in the wrong direction. The only time the company fails is when it is not possible to do a turnaround anymore. We help companies pivot into more profitable directions where they can expand and grow. It is inevitable that companies will end up making a few mistakes; we help them correct these mistakes.

Problems

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Solution

Suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

0 %
Increase Integration
0 %
Business Growth
0
Number of Sales

What Client Say

“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Robert Brown
Business Owner
“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Ruko Bendo
Business Owner

Retail banks wake up to digital lending this year

Overview

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Consulting represents success at realizing the company is going in the wrong direction. The only time the company fails is when it is not possible to do a turnaround anymore. We help companies pivot into more profitable directions where they can expand and grow. It is inevitable that companies will end up making a few mistakes; we help them correct these mistakes.

Problems

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Solution

Suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

0 %
Increase Integration
0 %
Business Growth
0
Number of Sales

What Client Say

“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Robert Brown
Business Owner
“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Ruko Bendo
Business Owner

Within the construction industry as their overdraft

Overview

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Consulting represents success at realizing the company is going in the wrong direction. The only time the company fails is when it is not possible to do a turnaround anymore. We help companies pivot into more profitable directions where they can expand and grow. It is inevitable that companies will end up making a few mistakes; we help them correct these mistakes.

Problems

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Solution

Suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

0 %
Increase Integration
0 %
Business Growth
0
Number of Sales

What Client Say

“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Robert Brown
Business Owner
“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Ruko Bendo
Business Owner

Retail banks wake up to digital lending this year

Overview

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Consulting represents success at realizing the company is going in the wrong direction. The only time the company fails is when it is not possible to do a turnaround anymore. We help companies pivot into more profitable directions where they can expand and grow. It is inevitable that companies will end up making a few mistakes; we help them correct these mistakes.

Problems

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Solution

Suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

0 %
Increase Integration
0 %
Business Growth
0
Number of Sales

What Client Say

“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Robert Brown
Business Owner
“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Ruko Bendo
Business Owner

Within the construction industry as their overdraft

Overview

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Consulting represents success at realizing the company is going in the wrong direction. The only time the company fails is when it is not possible to do a turnaround anymore. We help companies pivot into more profitable directions where they can expand and grow. It is inevitable that companies will end up making a few mistakes; we help them correct these mistakes.

Problems

Majority have suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

Solution

Suffered alteration in some form, by injected humour or good day randomised words which don’t look even slightly believable. If you are going to use a passage of lorem Ipsum, you need to be sure there isn’t anything make embarrassing hidden in the middle of text.

0 %
Increase Integration
0 %
Business Growth
0
Number of Sales

What Client Say

“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Robert Brown
Business Owner
“Cognition-based coaching and consulting approach, we facilitate your business growth from small to size from mid-size to global or from crisis to success.
Ruko Bendo
Business Owner

My 3 months at Webjet: Dzmitry Kakaruk

I joined Webjet back in May as a Master of IT & CS graduate from RMIT.

When looking for work I was looking for a place with a friendly and inclusive environment, which is not too small but not too big, is Australian with a growing international presence, a profitable business but still people-focused. I knew a few guys at Webjet and thought they were the type of people I could see myself working with.

The day I started I really felt how supportive and attentive is all the staff at Webjet, how I was part of the team from the get-go, how collaborative all the teams are, no ‘us’ and ‘them’ mentality.

I really enjoy being exposed to various technologies and products, various tech stacks, I was impressed with Webjet’s commitment to technology and quality of work.

All teams at Webjet have full operational product ownership, meaning a team has full responsibility from kick-off to release, support and operation of the product, which ensures a great customer experience with our products.

Currently, I work in the ‘Flights’ team, which is responsible for everything that has to do with searching flights from various vendors, showing best prices and providing the best value for our customers.

I enjoy working at Webjet, I believe I have gained a lot of new knowledge and constantly growing as a professional. There are always challenging issues to solve and an opportunity to research new tech and ideas. As part of Webjet culture, there is a great focus on continuous improvement and support of all staff members.

I’m always encouraged to bring new ideas, all thoughts are respected and taken into consideration which in turn encourages developers to provide the best product for our customers.

As an example, I was able to develop and deploy Openresty solution to solve a universal URL redirection problem. I didn’t have prior experience in this but was encouraged to learn.

My 3 months at Webjet: Rochelle Gracias

I joined Webjet back in April as a Master of IT & CS graduate from RMIT.

Working as a Developer at Webjet, I got to pick up coding tasks or stories that have been planned for the current sprint. Following an Agile development model, each morning we have a stand up where we discuss what we’ve worked on and if we have anything blocking our work. The rest of the day is spent on working through the stories, complete code reviews and deploying completed work into production. I’ve got to learn many new things and spend time with team mates asking questions and learning from their experience.

I’ve loved the variety of the work I got to do. Through the projects I’ve gotten a chance to work on have many different components like building the Jenkins pipeline, developing and maintaining the front-end applications and micro services. With any work I pick up, I’ve had the liberty to tackle it however I want, which often leads to a chance to learn something new. That’s something I love about working at Webjet. I’ve got ample opportunity to learn, either through the learning tools provided by the company to up skill, by my own research or discussing with the team I am a part off.

Being a fresh graduate, I still have things to learn and working with more experienced developers can sometimes be overwhelming and confusing especially during discussions. However, the few months that I worked at Webjet, I found that the team members are more than happy to explain the more complicated concepts or walk me through a task.

These aren’t the hotels I’m looking for!

The Problem

The hotels team at Webjet got tasked with developing a new auto complete feature for our site, that would be capable of sub second suggestions across thousands of cities, localities and areas, and be smart enough to figure out near matches.

The system we had currently that was part of our monolith was a very basic text based query engine that was not very performant, and very rigid in what results it returned.

Given our technical direction, to split out our monolith into Microservices, we had an opportunity to come up with an innovative way to solve the problem. Our initial reaction was to implement an Elastic search engine, but after further exploration we decided to try out Azure’s Pass offering, Azure Search. In theory would give us similar features, without the extra effort of managing the search system.

The three MVP features that were critical to our service were:

  • Result prioritization
  • Fuzzy logic to cater for spelling mistakes and near matches
  • Synonyms

Staying Relevant

Azure Search has a Suggestion API feature (https://docs.microsoft.com/en-us/rest/api/searchservice/suggestions), but we decided not to use it as it was not very flexible, with limited options when it comes to search result prioritization and “fuzzy” search terms with spelling mistakes.

With the Suggestions API not meeting our requirements, it was back to the drawing board, attempting to query the Azure Search API directly. To start off with, we tried querying the underlying Lucene index with just a Lucence wildcard search:

https://somesearchservice.search.windows.net/indexes/areas/docs?api-version=2016-09-01&search=mel*

While this worked well and returned a list of destinations, it wasn’t context aware, and did not prioritise the results. A search ‘mel’ returned:

  • Mele, Vanuatu
  • Melle, Germany
  • Melazzo, Italy
  • Melaya, Indonesia

Wait! Where is the most liveable city, Melbourne???

Melbourne, Victoria, Australia couldn’t even make it to the top 4. We wanted the ability to prioritise certain destinations based on sales volume and other business decisions. To enable custom priorities, we needed to use Scoring profiles. Scoring profiles are a way to boost or decrease the value of @search.score, which determines how relevant the result item is to the search term.

We added an additional field to our search called priority, a numeric value, scoring important destinations with a low value and less important destinations with a higher value. We then set up Priority field to boost the search relevance score for those destinations.

The maximum we want to boost is 2 and the linear interpolation here means the closer the priority to the end of the range, the more weight we want to throw in the score. As a result, the following call gives us Melbourne as the top match.

https://somesearchservice.search.windows.net/indexes/areas/docs?api-version=2016-09-01&scoringprofile=priorityprofile&search=mel*

Catering for User Mistakes

The second feature that needed is fuzzy logic. This would allow us to still return relevant results even if the user has made a spelling mistake or typo. For this, we first looked at using the Edit Distance based fuzzy search query capability built into the underlying Lucene search index. To do a fuzzy search, we specify the edit distance in each search term. For example, “sydbey~1” can match “sydney”.

This is what we’re after, however, it comes with some limitations:

  • The maximum Edit Distance you can set per query is 2, which means the search term can have a maximum of 2 mistakes to still be considered a match.
  • Edit Distance based fuzzy searching takes a huge hit on search performance.

As we needed to cater for multiple spelling mistakes and sub second response was critical fuzzy searching off the table we considered other ways we could cater for our needs of handling spelling mistakes.

We came across Custom Analysers (https://azure.microsoft.com/en-au/blog/custom-analyzers-in-azure-search/) which could handle simple fuzzy logic, and decided to give it a go. We created a phonetic analyser which consists of a standard tokenizer and the phonetic token filter. This custom indexer builds an indexer of all possible tokens of a word based on how the word could be pronounced. This feature would cover a much wider scope of mistakes, rather than just handling one or two typos. We now can handle cases where a customer simply is unsure of the spelling. With this combination, typos such as londno, londin, melborn and koala lamper are resolved to their expected destinations (London, Melbourne and Kuala Lumpur) with very little hit on performance.

 

Optimizing for Performance

With our search finally achieving the search results that we expected it was now time to tune the performance. We didn’t realise when we started, but performing wildcard queries against a Lucene search index takes a huge hit on performance.

Detailed in the above blog from Microsoft was the use of Lucene EdgeNGramAnalyzers. This custom analyser is ideal for searches where you are performing a partial word search such as our customers would be doing. The indexer tokenizes each word of our destinations into all combinations of its prefixes. For instance, “Melbourne” will be indexed as the separate tokens which cover all partial spellings of the word, ie: [m, me, mel, melb, melbo, melbour, melbourn, melborne].

With each of these tokens now stored in our index we can drop the wildcard from our query simplifying the query and making it more effective. Each the search can just perform a lookup of these tokens that have been created at index time rather than calculating them on the fly during search time.

Search Term Synonyms – When not all your mistakes are spelling mistakes

We were quite happy with the way it worked then we typed in “goldcoast”… it couldn’t suggest Gold Coast, Queensland, Australia which is one of our top destinations.

Finally, we figured out we also wanted to be able to handle search term Synonyms. For example, our analytics data showed that a very common customer search term that was returning no results was “goldcoast” when a customer means to search for “gold coast”. This was not picked up as a phonetic match as the index has no way of knowing that the single word “goldcoast” should be two words. Instead, we needed to also add these known mistakes into our index in some way.

Azure Search does provide a way to do this in the form of Synonym Maps (https://docs.microsoft.com/en-us/azure/search/search-synonyms) that let you match any known mistake to a word which represents the correct way it is spelt instead. We opted not to in this circumstance as it would mean using a preview version of the Azure Search API.

We instead just created an additional field against each of our destination records which holds a collection of all possible mistakes for that destination. Such as “goldcoast” against our Gold Coast, Australia record. It turns out to be a much more manual process since we need to manage these synonyms for each destination record, however it allows us to maintain full control over which records will appear for each of these non-phonetic mistakes.

Onwards and Upwards – Hotel Name Searching

With our new search live and taking traffic, our team analysed stats, and found a significant percentage of our customers were searching for a specific hotel. Our current hotel listings are stored in thousands of JSON files which are hosted in Azure blob. With the knowledge we’d gained setting up our destination search and Azure Search’s JSON Indexing feature (https://docs.microsoft.com/en-us/azure/search/search-howto-index-json-blobs) we were able to quickly and painlessly add hotel data to our search index as well, something that would never have been possible in our old system. (Note: Azure Search blob indexing is currently still in Preview however, we accepted the risks as it did not affect the core functionality of autocomplete)

Hope this blog gave you guys a good understanding of our use of Azure search. At the start of the project no one on our team had ever used any of these technologies and it was a rewarding experience to deliver a new feature that help our customers and addressed Webjet’s needs.

We’ll be publishing more blogs on our journey, as we take to scalpel to our Monolith.

We gratefully thank Geoff Polzin, a senior consultant  from Readify, for his contributions to this blog. Geoff was part of this journey too.