2013-08-28 19:24:34 -04:00
|
|
|
[[modules]]
|
|
|
|
= Modules
|
|
|
|
|
2015-06-22 17:49:45 -04:00
|
|
|
[partintro]
|
|
|
|
--
|
|
|
|
This section contains modules responsible for various aspects of the functionality in Elasticsearch. Each module has settings which may be:
|
|
|
|
|
|
|
|
_static_::
|
|
|
|
|
|
|
|
These settings must be set at the node level, either in the
|
|
|
|
`elasticsearch.yml` file, or as an environment variable or on the command line
|
|
|
|
when starting a node. They must be set on every relevant node in the cluster.
|
|
|
|
|
|
|
|
_dynamic_::
|
|
|
|
|
|
|
|
These settings can be dynamically updated on a live cluster with the
|
|
|
|
<<cluster-update-settings,cluster-update-settings>> API.
|
|
|
|
|
|
|
|
The modules in this section are:
|
|
|
|
|
|
|
|
<<modules-cluster,Cluster-level routing and shard allocation>>::
|
|
|
|
|
|
|
|
Settings to control where, when, and how shards are allocated to nodes.
|
|
|
|
|
|
|
|
<<modules-discovery,Discovery>>::
|
|
|
|
|
|
|
|
How nodes discover each other to form a cluster.
|
|
|
|
|
|
|
|
<<modules-gateway,Gateway>>::
|
|
|
|
|
|
|
|
How many nodes need to join the cluster before recovery can start.
|
|
|
|
|
|
|
|
<<modules-http,HTTP>>::
|
|
|
|
|
|
|
|
Settings to control the HTTP REST interface.
|
|
|
|
|
|
|
|
<<modules-indices,Indices>>::
|
|
|
|
|
|
|
|
Global index-related settings.
|
|
|
|
|
|
|
|
<<modules-network,Network>>::
|
|
|
|
|
|
|
|
Controls default network settings.
|
|
|
|
|
|
|
|
<<modules-node,Node client>>::
|
|
|
|
|
|
|
|
A Java node client joins the cluster, but doesn't hold data or act as a master node.
|
|
|
|
|
|
|
|
<<modules-plugins,Plugins>>::
|
|
|
|
|
|
|
|
Using plugins to extend Elasticsearch.
|
|
|
|
|
|
|
|
<<modules-scripting,Scripting>>::
|
|
|
|
|
|
|
|
Custom scripting available in Lucene Expressions, Groovy, Python, and
|
|
|
|
Javascript.
|
|
|
|
|
|
|
|
<<modules-snapshots,Snapshot/Restore>>::
|
|
|
|
|
|
|
|
Backup your data with snapshot/restore.
|
|
|
|
|
|
|
|
<<modules-threadpool,Thread pools>>::
|
|
|
|
|
|
|
|
Information about the dedicated thread pools used in Elasticsearch.
|
|
|
|
|
|
|
|
<<modules-transport,Transport>>::
|
|
|
|
|
|
|
|
Configure the transport networking layer, used internally by Elasticsearch
|
|
|
|
to communicate between nodes.
|
|
|
|
--
|
|
|
|
|
|
|
|
|
2013-08-28 19:24:34 -04:00
|
|
|
include::modules/cluster.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/discovery.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/gateway.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/http.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/indices.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/network.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/node.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/plugins.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/scripting.asciidoc[]
|
|
|
|
|
make term statistics accessible in scripts
term statistics can be accessed via the _shard variable.
Below is a minimal example. See documentation on details.
```
DELETE paytest
PUT paytest
{
"mappings": {
"test": {
"_all": {
"auto_boost": true,
"enabled": true
},
"properties": {
"text": {
"index_analyzer": "fulltext_analyzer",
"store": "yes",
"type": "string"
}
}
}
},
"settings": {
"analysis": {
"analyzer": {
"fulltext_analyzer": {
"filter": [
"my_delimited_payload_filter"
],
"tokenizer": "whitespace",
"type": "custom"
}
},
"filter": {
"my_delimited_payload_filter": {
"delimiter": "+",
"encoding": "float",
"type": "delimited_payload_filter"
}
}
},
"index": {
"number_of_replicas": 0,
"number_of_shards": 1
}
}
}
POST paytest/test/1
{
"text": "the+1 quick+2 brown+3 fox+4 is quick+10"
}
POST paytest/test/2
{
"text": "the+1 quick+2 red+3 fox+4"
}
POST paytest/_refresh
POST paytest/_search
{
"script_fields": {
"ttf": {
"script": "_shard[\"text\"][\"quick\"].ttf()"
}
}
}
POST paytest/_search
{
"script_fields": {
"freq": {
"script": "_shard[\"text\"][\"quick\"].freq()"
}
}
}
POST paytest/test/2/_termvector
POST paytest/_search
{
"script_fields": {
"payloads": {
"script": "term = _shard[\"text\"].get(\"red\",_PAYLOADS);payloads = []; for(pos : term){payloads.add(pos.payloadAsFloat(-1));} return payloads;"
}
}
}
POST paytest/_search
{
"script_fields": {
"tv": {
"script": "_shard[\"text\"][\"quick\"].freq()"
}
},
"query": {
"function_score": {
"functions": [
{
"script_score": {
"script": "_shard[\"text\"][\"quick\"].freq()"
}
}
]
}
}
}
```
closes #3772
2014-01-02 05:17:33 -05:00
|
|
|
include::modules/advanced-scripting.asciidoc[]
|
|
|
|
|
2015-06-22 17:49:45 -04:00
|
|
|
include::modules/snapshots.asciidoc[]
|
|
|
|
|
2013-08-28 19:24:34 -04:00
|
|
|
include::modules/threadpool.asciidoc[]
|
|
|
|
|
|
|
|
include::modules/transport.asciidoc[]
|
|
|
|
|
2015-06-22 17:49:45 -04:00
|
|
|
include::modules/tribe.asciidoc[]
|
|
|
|
|
2013-11-08 19:20:43 -05:00
|
|
|
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
|