Remove most of the need for // NOTCONSOLE

and be much more stingy about what we consider a console candidate.

* Add `// CONSOLE` to check-running
* Fix version in some snippets
* Mark groovy snippets as groovy
* Fix versions in plugins
* Fix language marker errors
* Fix language parsing in snippets

  This adds support for snippets who's language is written like
  `[source, txt]` and `["source","js",subs="attributes,callouts"]`.

  This also makes language required for snippets which is nice because
  then we can be sure we can grep for snippets in a particular language.
This commit is contained in:
Nik Everett 2016-08-29 17:33:25 -04:00
parent 6df70444a3
commit 5cff2a046d
44 changed files with 167 additions and 159 deletions

View file

@ -17,7 +17,6 @@ This plugin can be installed using the plugin manager:
----------------------------------------------------------------
sudo bin/elasticsearch-plugin install lang-javascript
----------------------------------------------------------------
// NOTCONSOLE
The plugin must be installed on every node in the cluster, and each node must
be restarted after installation.
@ -32,7 +31,6 @@ The plugin can be removed with the following command:
----------------------------------------------------------------
sudo bin/elasticsearch-plugin remove lang-javascript
----------------------------------------------------------------
// NOTCONSOLE
The node must be stopped before removing the plugin.
@ -147,11 +145,10 @@ JavaScript:
First, save this file as `config/scripts/my_script.js` on every node
in the cluster:
[source,js]
[source,painless]
----
doc["num"].value * factor
----
// NOTCONSOLE
then use the script as follows: