Add rank-eval module to transport client and HL client dependencies
This commit is contained in:
parent
33bcfddb54
commit
5406a9f30d
|
@ -196,6 +196,7 @@ subprojects {
|
||||||
"org.elasticsearch.plugin:parent-join-client:${version}": ':modules:parent-join',
|
"org.elasticsearch.plugin:parent-join-client:${version}": ':modules:parent-join',
|
||||||
"org.elasticsearch.plugin:aggs-matrix-stats-client:${version}": ':modules:aggs-matrix-stats',
|
"org.elasticsearch.plugin:aggs-matrix-stats-client:${version}": ':modules:aggs-matrix-stats',
|
||||||
"org.elasticsearch.plugin:percolator-client:${version}": ':modules:percolator',
|
"org.elasticsearch.plugin:percolator-client:${version}": ':modules:percolator',
|
||||||
|
"org.elasticsearch.plugin:rank-eval-client:${version}": ':modules:rank-eval',
|
||||||
]
|
]
|
||||||
|
|
||||||
for (final Version version : versionCollection.versionsIndexCompatibleWithCurrent) {
|
for (final Version version : versionCollection.versionsIndexCompatibleWithCurrent) {
|
||||||
|
|
|
@ -39,6 +39,7 @@ dependencies {
|
||||||
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
|
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
|
||||||
compile "org.elasticsearch.plugin:parent-join-client:${version}"
|
compile "org.elasticsearch.plugin:parent-join-client:${version}"
|
||||||
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
|
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
|
||||||
|
compile "org.elasticsearch.plugin:rank-eval-client:${version}"
|
||||||
|
|
||||||
testCompile "org.elasticsearch.client:test:${version}"
|
testCompile "org.elasticsearch.client:test:${version}"
|
||||||
testCompile "org.elasticsearch.test:framework:${version}"
|
testCompile "org.elasticsearch.test:framework:${version}"
|
||||||
|
@ -60,4 +61,4 @@ forbiddenApisMain {
|
||||||
// specified
|
// specified
|
||||||
signaturesURLs += [PrecommitTasks.getResource('/forbidden/http-signatures.txt')]
|
signaturesURLs += [PrecommitTasks.getResource('/forbidden/http-signatures.txt')]
|
||||||
signaturesURLs += [file('src/main/resources/forbidden/rest-high-level-signatures.txt').toURI().toURL()]
|
signaturesURLs += [file('src/main/resources/forbidden/rest-high-level-signatures.txt').toURI().toURL()]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,6 @@ package org.elasticsearch.client;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonParseException;
|
import com.fasterxml.jackson.core.JsonParseException;
|
||||||
|
|
||||||
import org.elasticsearch.Build;
|
|
||||||
import org.elasticsearch.ElasticsearchException;
|
|
||||||
import org.elasticsearch.Version;
|
|
||||||
import org.elasticsearch.action.ActionListener;
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionRequestValidationException;
|
|
||||||
import org.elasticsearch.action.main.MainRequest;
|
|
||||||
import org.elasticsearch.action.main.MainResponse;
|
|
||||||
import org.elasticsearch.action.search.ClearScrollRequest;
|
|
||||||
import org.elasticsearch.action.search.ClearScrollResponse;
|
|
||||||
import org.elasticsearch.action.search.SearchResponse;
|
|
||||||
import org.elasticsearch.action.search.SearchResponseSections;
|
|
||||||
import org.elasticsearch.action.search.SearchScrollRequest;
|
|
||||||
import org.elasticsearch.action.search.ShardSearchFailure;
|
|
||||||
import org.apache.http.Header;
|
import org.apache.http.Header;
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
import org.apache.http.HttpHost;
|
import org.apache.http.HttpHost;
|
||||||
|
@ -49,6 +35,20 @@ import org.apache.http.message.BasicHttpResponse;
|
||||||
import org.apache.http.message.BasicRequestLine;
|
import org.apache.http.message.BasicRequestLine;
|
||||||
import org.apache.http.message.BasicStatusLine;
|
import org.apache.http.message.BasicStatusLine;
|
||||||
import org.apache.http.nio.entity.NStringEntity;
|
import org.apache.http.nio.entity.NStringEntity;
|
||||||
|
import org.elasticsearch.Build;
|
||||||
|
import org.elasticsearch.ElasticsearchException;
|
||||||
|
import org.elasticsearch.Version;
|
||||||
|
import org.elasticsearch.action.ActionListener;
|
||||||
|
import org.elasticsearch.action.ActionRequest;
|
||||||
|
import org.elasticsearch.action.ActionRequestValidationException;
|
||||||
|
import org.elasticsearch.action.main.MainRequest;
|
||||||
|
import org.elasticsearch.action.main.MainResponse;
|
||||||
|
import org.elasticsearch.action.search.ClearScrollRequest;
|
||||||
|
import org.elasticsearch.action.search.ClearScrollResponse;
|
||||||
|
import org.elasticsearch.action.search.SearchResponse;
|
||||||
|
import org.elasticsearch.action.search.SearchResponseSections;
|
||||||
|
import org.elasticsearch.action.search.SearchScrollRequest;
|
||||||
|
import org.elasticsearch.action.search.ShardSearchFailure;
|
||||||
import org.elasticsearch.cluster.ClusterName;
|
import org.elasticsearch.cluster.ClusterName;
|
||||||
import org.elasticsearch.common.CheckedFunction;
|
import org.elasticsearch.common.CheckedFunction;
|
||||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||||
|
@ -57,6 +57,10 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||||
import org.elasticsearch.common.xcontent.XContentParser;
|
import org.elasticsearch.common.xcontent.XContentParser;
|
||||||
import org.elasticsearch.common.xcontent.cbor.CborXContent;
|
import org.elasticsearch.common.xcontent.cbor.CborXContent;
|
||||||
import org.elasticsearch.common.xcontent.smile.SmileXContent;
|
import org.elasticsearch.common.xcontent.smile.SmileXContent;
|
||||||
|
import org.elasticsearch.index.rankeval.DiscountedCumulativeGain;
|
||||||
|
import org.elasticsearch.index.rankeval.EvaluationMetric;
|
||||||
|
import org.elasticsearch.index.rankeval.MeanReciprocalRank;
|
||||||
|
import org.elasticsearch.index.rankeval.PrecisionAtK;
|
||||||
import org.elasticsearch.join.aggregations.ChildrenAggregationBuilder;
|
import org.elasticsearch.join.aggregations.ChildrenAggregationBuilder;
|
||||||
import org.elasticsearch.rest.RestStatus;
|
import org.elasticsearch.rest.RestStatus;
|
||||||
import org.elasticsearch.search.SearchHits;
|
import org.elasticsearch.search.SearchHits;
|
||||||
|
@ -648,7 +652,7 @@ public class RestHighLevelClientTests extends ESTestCase {
|
||||||
|
|
||||||
public void testProvidedNamedXContents() {
|
public void testProvidedNamedXContents() {
|
||||||
List<NamedXContentRegistry.Entry> namedXContents = RestHighLevelClient.getProvidedNamedXContents();
|
List<NamedXContentRegistry.Entry> namedXContents = RestHighLevelClient.getProvidedNamedXContents();
|
||||||
assertEquals(2, namedXContents.size());
|
assertEquals(5, namedXContents.size());
|
||||||
Map<Class<?>, Integer> categories = new HashMap<>();
|
Map<Class<?>, Integer> categories = new HashMap<>();
|
||||||
List<String> names = new ArrayList<>();
|
List<String> names = new ArrayList<>();
|
||||||
for (NamedXContentRegistry.Entry namedXContent : namedXContents) {
|
for (NamedXContentRegistry.Entry namedXContent : namedXContents) {
|
||||||
|
@ -658,10 +662,14 @@ public class RestHighLevelClientTests extends ESTestCase {
|
||||||
categories.put(namedXContent.categoryClass, counter + 1);
|
categories.put(namedXContent.categoryClass, counter + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assertEquals(1, categories.size());
|
assertEquals(2, categories.size());
|
||||||
assertEquals(Integer.valueOf(2), categories.get(Aggregation.class));
|
assertEquals(Integer.valueOf(2), categories.get(Aggregation.class));
|
||||||
assertTrue(names.contains(ChildrenAggregationBuilder.NAME));
|
assertTrue(names.contains(ChildrenAggregationBuilder.NAME));
|
||||||
assertTrue(names.contains(MatrixStatsAggregationBuilder.NAME));
|
assertTrue(names.contains(MatrixStatsAggregationBuilder.NAME));
|
||||||
|
assertEquals(Integer.valueOf(3), categories.get(EvaluationMetric.class));
|
||||||
|
assertTrue(names.contains(PrecisionAtK.NAME));
|
||||||
|
assertTrue(names.contains(DiscountedCumulativeGain.NAME));
|
||||||
|
assertTrue(names.contains(MeanReciprocalRank.NAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class TrackingActionListener implements ActionListener<Integer> {
|
private static class TrackingActionListener implements ActionListener<Integer> {
|
||||||
|
|
|
@ -32,6 +32,7 @@ dependencies {
|
||||||
compile "org.elasticsearch.plugin:lang-mustache-client:${version}"
|
compile "org.elasticsearch.plugin:lang-mustache-client:${version}"
|
||||||
compile "org.elasticsearch.plugin:percolator-client:${version}"
|
compile "org.elasticsearch.plugin:percolator-client:${version}"
|
||||||
compile "org.elasticsearch.plugin:parent-join-client:${version}"
|
compile "org.elasticsearch.plugin:parent-join-client:${version}"
|
||||||
|
compile "org.elasticsearch.plugin:rank-eval-client:${version}"
|
||||||
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
|
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
|
||||||
testCompile "junit:junit:${versions.junit}"
|
testCompile "junit:junit:${versions.junit}"
|
||||||
testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"
|
testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"
|
||||||
|
@ -54,4 +55,4 @@ namingConventions {
|
||||||
testClass = 'com.carrotsearch.randomizedtesting.RandomizedTest'
|
testClass = 'com.carrotsearch.randomizedtesting.RandomizedTest'
|
||||||
//we don't have integration tests
|
//we don't have integration tests
|
||||||
skipIntegTestInDisguise = true
|
skipIntegTestInDisguise = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ ifeval::["{release-state}"=="unreleased"]
|
||||||
:parent-join-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/parent-join-client/{version}-SNAPSHOT
|
:parent-join-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/parent-join-client/{version}-SNAPSHOT
|
||||||
:percolator-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/percolator-client/{version}-SNAPSHOT
|
:percolator-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/percolator-client/{version}-SNAPSHOT
|
||||||
:matrixstats-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/aggs-matrix-stats-client/{version}-SNAPSHOT
|
:matrixstats-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/aggs-matrix-stats-client/{version}-SNAPSHOT
|
||||||
|
:rank-eval-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/rank-eval-client/{version}-SNAPSHOT
|
||||||
endif::[]
|
endif::[]
|
||||||
|
|
||||||
ifeval::["{release-state}"!="unreleased"]
|
ifeval::["{release-state}"!="unreleased"]
|
||||||
|
@ -48,6 +49,7 @@ ifeval::["{release-state}"!="unreleased"]
|
||||||
:parent-join-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/parent-join-client/{version}
|
:parent-join-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/parent-join-client/{version}
|
||||||
:percolator-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/percolator-client/{version}
|
:percolator-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/percolator-client/{version}
|
||||||
:matrixstats-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/aggs-matrix-stats-client/{version}
|
:matrixstats-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/aggs-matrix-stats-client/{version}
|
||||||
|
:rank-eval-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/rank-eval-client/{version}
|
||||||
endif::[]
|
endif::[]
|
||||||
|
|
||||||
///////
|
///////
|
||||||
|
|
Loading…
Reference in New Issue