We’ve recently posted articles on topics ranging from simple scripting to advanced methods in scripting to eliminating duplicates in your indexes.

Here in this tutorial, we help you learn how to combine the script_fields and geo_point methods to generate examples that you can use for modeling in a wide variety of real-world applications. We also give a brief introduction of the Explain API, which is a good aid in understanding how Elasticsearch computes document scores.

Keep reading

Elasticsearch users employ scoring to give a higher weight to documents that meet specific criteria. As we show with several examples in our previous article on scoring, the objective is often to get a list of documents with a sorting on the relevance to the search. Relevance is the numerical output of an algorithm that gives a measure of how a particular document is textually similar to the query. Elasticsearch employs and enhances standard scoring algorithms and encapsulates these within its script_score and function_score features.

This article is a continuation of our lengthy tutorial series on scripting in Elasticsearch, and it goes further than the scoring basics that we cover in the previously. Here, we explore advanced scoring techniques using decay functions. We provide a few permutations of a geographical search example, provide example code, and show the results.

Keep reading

The popularity of Elasticsearch is largely attributable to the ease with which a user can approach and begin using it. Although it’s true that a developer can ramp up quickly to some of the basic skills in Elasticsearch, it can be quite difficult to diagnose and solve problems. We know all too well that there are many common pitfalls that new and intermediate users encounter.

You’ll be glad to know that this article provides you with a number of suggestions, tips, and tricks to help ease your journey and reduce frustration. We consider this information to be elemental for new Elasticsearch users, and we also expect that intermediate users will find much of value here.

Keep reading

We’re well along now in our series on Elasticsearch scripting. In the previous article, we cover the various types of filters that you can perform with scripts. In this article, our focus turns to scoring in Elasticsearch.

We generally define scoring as giving a higher weight to documents (or data) that meet specific criteria. The objective is often to get a list of documents, sorted on the relevance to the search. Typically, relevance is the numerical output of an algorithm that determines which documents are most textually similar to the query. Elasticsearch employs and enhances standard scoring algorithms and encapsulates these within script_score and function_score.

This article introduces these highly valuable features and provides some examples that you can take with you and apply in your development efforts.

Keep reading

Although Elasticsearch offers an efficient scoring algorithm, it may often be inadequate in e-commerce contexts. Most users tend to care only about the topmost number of results. which means that it’s very important to have a flexible scoring mechanism. If you can present the topmost results according to user preference, then your conversion rate is likely to increase significantly.

In this article, we’ll look at the default scoring configuration in Elasticsearch, and we’ll also walk through several customizations to the scoring. This knowledge can help you achieve a user-customizable list of results.

Keep reading