Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 867 Bytes

330_Scripting.asciidoc

File metadata and controls

43 lines (30 loc) · 867 Bytes

Scripting – when you need more (TODO)

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

.