Update to elasticsearch 1.2.0

Closes #20
Fix #19
This commit is contained in:
David Pilato 2014-05-23 19:54:45 +02:00
parent 22465d23e7
commit 10b3c89009
4 changed files with 11 additions and 5 deletions

View File

@ -3,9 +3,10 @@ JavaScript lang Plugin for Elasticsearch
The JavaScript language plugin allows to have `javascript` (or `js`) as the language of scripts to execute. The JavaScript language plugin allows to have `javascript` (or `js`) as the language of scripts to execute.
In order to install the plugin, simply run: `bin/plugin -install elasticsearch/elasticsearch-lang-javascript/2.0.0.RC1`. In order to install the plugin, simply run: `bin/plugin -install elasticsearch/elasticsearch-lang-javascript/2.1.0`.
* For master elasticsearch versions, look at [master branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/master). * For master elasticsearch versions, look at [master branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/master).
* For 1.2.x elasticsearch versions, look at [es-1.2 branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/es-1.2).
* For 1.1.x elasticsearch versions, look at [es-1.1 branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/es-1.1). * For 1.1.x elasticsearch versions, look at [es-1.1 branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/es-1.1).
* For 1.0.x elasticsearch versions, look at [es-1.0 branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/es-1.0). * For 1.0.x elasticsearch versions, look at [es-1.0 branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/es-1.0).
* For 0.90.x elasticsearch versions, look at [es-0.90 branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/es-0.90). * For 0.90.x elasticsearch versions, look at [es-0.90 branch](https://github.com/elasticsearch/elasticsearch-lang-javascript/tree/es-0.90).

View File

@ -33,7 +33,7 @@
<properties> <properties>
<elasticsearch.version>2.0.0-SNAPSHOT</elasticsearch.version> <elasticsearch.version>2.0.0-SNAPSHOT</elasticsearch.version>
<lucene.version>4.7.0</lucene.version> <lucene.version>4.8.1</lucene.version>
<tests.jvms>1</tests.jvms> <tests.jvms>1</tests.jvms>
<tests.shuffle>true</tests.shuffle> <tests.shuffle>true</tests.shuffle>
<tests.output>onerror</tests.output> <tests.output>onerror</tests.output>
@ -117,8 +117,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
<configuration> <configuration>
<source>1.6</source> <source>1.7</source>
<target>1.6</target> <target>1.7</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>

View File

@ -81,6 +81,11 @@ public class JavaScriptScriptEngineService extends AbstractComponent implements
return new String[]{"js"}; return new String[]{"js"};
} }
@Override
public boolean sandboxed() {
return false;
}
@Override @Override
public Object compile(String script) { public Object compile(String script) {
Context ctx = Context.enter(); Context ctx = Context.enter();

View File

@ -20,7 +20,6 @@
package org.elasticsearch.script.javascript; package org.elasticsearch.script.javascript;
import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.util.concurrent.jsr166y.ThreadLocalRandom;
import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.script.ExecutableScript;
import org.elasticsearch.test.ElasticsearchTestCase; import org.elasticsearch.test.ElasticsearchTestCase;
import org.junit.Test; import org.junit.Test;
@ -29,6 +28,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier; import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;