How Norway Post built their search function with Enonic XPMorten Eriksen on
Enonic XP uses the fast and powerful Elasticsearch as the platform's search function. See how Norway Post utilised the search functionality on their new website.
How do you find stuff? You usually search, right? Even though you might know exactly where a given page is on a website and could browse to it via the menus, chances are that you probably just search for it instead, either on Google or in the website’s own search engine. I sure do.
Now you’re probably wondering how Enonic XP handles its search function. Do we use Google as some folks do, or have we made our own solution from scratch? Truth is, we’re using a product called Elasticsearch, and it’s working great! Let’s see how it functions and how we have implemented search for one of our major customers, Norway Post (Posten Norge).
Curious about what Enonic XP can do for you?
Background: Norway Post
In 2014 Norway Post had a website that wasn’t fully responsive and was gradually (or should we say rapidly) expanding in content, making it hard for customers to find what they needed in a world of multiple brands, countless products and several employee intranets.
A redesign project was initiated for better user experience (UX), a simpler structure and to help visitors solving tasks more efficiently.
Challenge: Different systems
Norway Post wanted to empower their users and customers with one complete search function that covered web content, files, Norwegian addresses, post offices and postal codes. Yes, you read that right: All of these elements in one search.
However, the data for all these elements resided in different systems. Postal codes and addresses (around two million of them!) were located in one database, while post offices were in a separate system with a solution to show the offices with connected maps and info. Adding to all of this was the editorial web content—something also of importance.
As mentioned, Norway Post had a goal to present the results in one search, with relevance scoring across all types of content (e.g. connecting post offices to given postal codes). Norway Post also had a focus on accessibility and a faster search. A challenge here was that several existing solutions handled the searches—resulting in more hosting, worse UX, sluggish performance etc.
To address the complex challenge facing Norway Post, Enonic implemented facets, or navigation categories, for each data type—i.e. web content, post offices, postal codes and addresses. All external content was set to be imported periodically into separate databases (also called repositories) in Enonic XP. The databases were separated to ensure that data was kept clean and not mixed—it would be a disaster if editorial content and addresses suddenly were mixed up. But in contrast to the previous solution, these databases were located in the same system powered by a search engine, ensuring fast delivery.
Furthermore, the search results were sorted by relevance across all data. We set the relevance by the standard of whatever fits your keywords best, and optimised the search by boosting titles, keywords etc. This means that search hits in titles count more than e.g. hits in body text.
Norway Post was also concerned about UX and accessibility. Being a major, well-known and well-used organisation made it a matter of great importance for Norway Post to give users with disabilities access to their search and solutions. UX and accessibility were implemented with features like keyboard support, high contrast and larger fonts.
Closely linked to user-friendliness is the autocomplete function, which allows instant response when you type in the search field.
The team involved
The involved team consisted of the following roles:
- UX designers
- Implemented usability and accessibility standards, like described above
- Developers and technical resources
- Responsible for the front-end and back-end coding, as well as the Enonic XP configuration
- Enonic expert
- Involved in front-end development, architecture and UX
- Tested functionality thoroughly
The idea of self-service and solving tasks were made easy with new search functionality in Enonic XP, combining the power of Elasticsearch with the CMS. Instead of retrieving data from several separate systems, Norway Post now has one platform to handle all their search requirements. This fact reduces the need for maintenance and simplifies skills required to improve the solution in the future.