OpenSearch/docs/reference
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
..
aggregations Fix docs example after #21218. 2016-11-07 14:57:20 +01:00
analysis Fixed typos (#20843) 2016-10-10 14:51:47 -06:00
cat Move flush in _cat/indices docs tests (#21117) 2016-11-04 10:32:07 -04:00
cluster Clarify requesting all stats in node stats docs 2016-11-08 13:47:15 -05:00
docs Fix asciidoc structure for sliced reindex 2016-11-04 21:59:19 -04:00
how-to Add recommendations about getting consistent scores despite shards and replicas. (#21167) 2016-11-02 10:50:38 +01:00
images Docs: clarify calculation of sigma and lambda in function_score (#20267) 2016-09-02 14:41:07 +02:00
index-modules Update store.asciidoc (#21353) 2016-11-05 14:58:16 +01:00
indices Fixed rollover docs test for date math indices 2016-11-03 13:48:34 +01:00
ingest make painless the default scripting language for ScriptProcessor (#20981) 2016-10-18 16:22:01 -07:00
mapping Fix typo in keyword.asciidoc (#21237) 2016-11-01 10:15:12 -04:00
migration Remove 5.x references from cat API migration doc 2016-11-09 07:09:59 -05:00
modules Implement reading from null safe dereferences 2016-11-09 07:20:11 -05:00
query-dsl Add "all field" execution mode to query_string query 2016-11-04 05:46:18 -06:00
search Make it clear _suggest doesn't support source filtering (#21268) 2016-11-06 20:15:45 -05:00
setup Updated install docs to add missing empty cell in directory layout 2016-11-09 11:54:56 +01:00
testing Update docs after test-framework moved 2016-11-02 09:51:55 -04:00
aggregations.asciidoc CONSOLEify some aggs docs 2016-10-03 09:22:56 -04:00
analysis.asciidoc First pass at improving analyzer docs (#18269) 2016-05-11 14:17:56 +02:00
api-conventions.asciidoc [DOCS] Add "version" to template and pipeline docs (#20407) 2016-10-18 11:56:18 -04:00
cat.asciidoc Adding built-in sorting capability to _cat apis. (#20658) 2016-10-11 12:29:22 -04:00
cluster.asciidoc Convert more docs to CONSOLE 2016-09-21 09:36:21 -04:00
docs.asciidoc Add support for waiting until a refresh occurs 2016-06-06 11:37:53 -04:00
getting-started.asciidoc Add note to getting-started doc about CONSOLE 2016-10-30 00:09:09 -04:00
glossary.asciidoc Improve glossary to not refer to types as "like a table" (#17704) 2016-04-13 14:29:47 +02:00
how-to.asciidoc Add support for `quote_field_suffix` to `simple_query_string`. (#21060) 2016-10-28 09:11:57 +02:00
index-modules.asciidoc Add a hard limit for `index.number_of_shard` (#20682) 2016-09-29 11:03:30 +02:00
index.asciidoc Fix Lucene version in the docs. 2016-10-28 14:50:46 +02:00
indices.asciidoc Removed the upgrade API docs 2016-10-11 12:21:46 +02:00
ingest.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
mapping.asciidoc Reorganised docs for mapping safeguard settings 2016-09-22 14:58:17 +02:00
modules.asciidoc refactor matrix agg documentation from modules to main agg section 2016-06-06 07:39:00 -05:00
query-dsl.asciidoc
redirects.asciidoc Add an indices-upgrade section to the docs redirects. 2016-10-11 12:39:02 +02:00
release-notes.asciidoc Remove links to release notes 2016-09-08 18:07:39 +02:00
search.asciidoc Makes search action cancelable by task management API 2016-10-25 12:27:34 -10:00
setup.asciidoc Die with dignity 2016-07-07 14:44:03 -04:00
testing.asciidoc