Lucene expressions

Lucene expressions are a very powerful tool for easy scoring adjustments, without writing custom Java code. The thing that makes Lucene expressions very handy is that using them is very fast-their execution is as fast as native scripts since each expression is compiled to Java bytecode, to achieve native code-like performance, yet they are like dynamic scripts with some limitations. This section will show you what you can do with Lucene expressions.

The basics

Lucene provides functionality to compile a JavaScript expression to a Java bytecode. This is how Lucene expressions work and why they are as fast as native Elasticsearch scripts. Lucene expressions can be used in the following Elasticsearch functionalities:

  • Scripts responsible ...

Get Mastering Elasticsearch 5.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.