Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Latest commit

 

History

History
43 lines (30 loc) · 860 Bytes

190_Scripting.asciidoc

File metadata and controls

43 lines (30 loc) · 860 Bytes

Scripting – when you need more

Sometimes, the default functionality just isn’t enough – instead, we need to apply some custom logic that can only be expressed programmatically. For this reason, the ability to incorporate custom scripts into the search process is integral to Elasticsearch.

In this chapter we explore the scripting functionality, discuss where we can use scripting and provide commonly used example scripts.

Scripting in Elasticsearch

.

default scripting language mvel

  • passing parameters

  • accessing document fields

  • built-in functions

  • example scripts

other scripting languages

  • javascript

  • groovy

  • python

  • native Java scripts

script fields

.

Query DSL

  • script filters

  • relevance custom score and custom_filters_score

sorting

.

Scripting and facets

.