elasticsearch/docs/reference/modules
Nik Everett d03b8e4abb Implement reading from null safe dereferences
Null safe dereferences make handling null or missing values shorter.
Compare without:
```
if (ctx._source.missing != null && ctx._source.missing.foo != null) {
  ctx._source.foo_length = ctx.source.missing.foo.length()
}
```

To with:
```
Integer length = ctx._source.missing?.foo?.length();
if (length != null) {
  ctx._source.foo_length = length
}
```

Combining this with the as of yet unimplemented elvis operator allows
for very concise defaults for nulls:
```
ctx._source.foo_length = ctx._source.missing?.foo?.length() ?: 0;
```

Since you have to start somewhere, we started with null safe dereferenes.

Anyway, this is a feature borrowed from groovy. Groovy allows writing to
null values like:
```
def v = null
v?.field = 'cat'
```
And the writes are simply ignored. Painless doesn't support this at this
point because it'd be complex to implement and maybe not all that useful.

There is no runtime cost for this feature if it is not used. When it is
used we implement it fairly efficiently, adding a jump rather than a
temporary variable.

This should also work fairly well with doc values.
2016-11-09 07:20:11 -05:00
..
cluster Docs: Cluster Allocation Filtering 2016-10-17 11:02:33 +11:00
discovery [DOCS] clarifies master nodes to be master eligible nodes 2016-10-24 08:58:44 -04:00
indices Convert more docs to CONSOLE 2016-09-21 09:36:21 -04:00
scripting Implement reading from null safe dereferences 2016-11-09 07:20:11 -05:00
cluster.asciidoc Fix typo in cluster module docs 2016-07-12 16:32:23 -04:00
discovery.asciidoc [DOCS] add azure and gce discovery plugins 2014-02-06 09:18:42 +01:00
gateway.asciidoc Update gateway.asciidoc (#19572) 2016-07-28 13:09:05 +02:00
http.asciidoc Clarifies the documentation for the http.cors.enabled setting (#19890) 2016-08-09 12:54:38 -05:00
indices.asciidoc Fix doc build. 2016-06-22 09:34:49 +02:00
memcached.asciidoc Fix organization rename in all files in project 2016-03-03 12:04:13 -07:00
network.asciidoc Update network.asciidoc 2016-07-08 17:13:10 +02:00
node.asciidoc Fixed typos (#20843) 2016-10-10 14:51:47 -06:00
plugins.asciidoc Docs: Prepare plugin and integration docs for 2.0 2015-08-15 18:02:43 +02:00
scripting.asciidoc Deprecate Groovy, Python, and Javascript scripts. 2016-08-30 09:06:18 -07:00
snapshots.asciidoc Docs: note about snapshot version compatibility (#20896) 2016-10-13 10:49:32 -04:00
threadpool.asciidoc Add doc note regarding processors bound 2016-10-14 10:32:31 -04:00
thrift.asciidoc Fix organization rename in all files in project 2016-03-03 12:04:13 -07:00
transport.asciidoc Remove LocalTransport in favor of MockTcpTransport (#20695) 2016-10-07 11:27:47 +02:00
tribe.asciidoc Remove custom plugins path 2016-05-26 10:16:25 -04:00