Let’s face it, many website search results are hit and miss. Sometimes you just have to shake your head at the obtuseness of what you’re getting in response to your query; “It’s an elephantburger restaurant, why doesn’t ‘elephant’ return any results?!”

And the need on the development side of the website to search and find your data quickly is just as great.

Fortunately, for those using WordPress as their content management system (and a third of all websites are using WordPress), there is a great solution for your customers and your staff. Elasticsearch has found a way of quickly matching a search with the correct result and more.

WHAT IS ELASTICSEARCH?

Elasticsearch is an open-source search and analytics engine. Elasticsearch takes in unstructured data from different locations, stores and indexes it and makes it searchable. It can analyze huge volumes of data and then respond quickly. Traditional SQL database management systems are not designed for full-text searches of large volumes of data. Because it’s built on top of Lucene—a Java library used for the full text search of documents—Elasticsearch offers one of the most powerful full-text search capabilities and lets you perform and combine many types of searches.

The speed and scalability of Elasticsearch allow it to be used for:

  • Application search
  • Website search
  • Enterprise search
  • Logging and log analytics
  • Infrastructure metrics and container monitoring
  • Application performance monitoring
  • Geospatial data analysis and visualization
  • Security analytics
  • Business analytics

Once your data is indexed in Elasticsearch, users can run complex queries against their data and use aggregations to retrieve complex summaries of their data. An inverted index is a list of every unique word that appears in any document and additionally it identifies all of the documents each word occurs in.

Elasticsearch started as a scalable version of the Lucene open-source search framework then added the ability to horizontally scale Lucene indices. It allows you to store, search, and analyze huge volumes of data quickly and in (near) real-time and give back your answers in milliseconds. It’s able to achieve such fast search responses because, instead of searching the text directly, it is searching an index.

Besides keeping website visitors and developers happy, WooCommerce sites have been able to experience exponential performance gains on the product search feature. Searches that took 10 seconds or more to via MySQL were reduced to under one second. It’s a very powerful tool that can make your visitors and happy and coming back.

WITHIN WORDPRESS

The WordPress default search doesn’t allow for the less precise search, or when someone makes a slight spelling mistake; it does not perform these searches effectively. Another limitation in WordPress is that it only searches and matches the words that are in the title and content, and it doesn’t match with categories.

Elasticsearch can be used to speed up querying of the WordPress database by building an index of the content of your database and then using Elasticsearch to search this index.

If your site makes relatively standard use of WP_Query, Elasticsearch can also be integrated by installing ElasticPress, a free WordPress plugin from 10up which automatically integrates with the WP_Query object to generate query results with Elasticsearch rather than MySQL. Elasticsearch can be integrated with a WordPress site by a knowledgeable WordPress and Elasticsearch developer.

It is not difficult to configure Elasticsearch on WordPress but if you need help, we can provide it.

With offices in Washington, D.C. and Los Angeles, Ca., New Target provides digital strategy, digital marketing, web design, web development, branding, website hosting, and creative services for prominent nonprofits, companies, and government.