Skip to content

Commit 55f968c

Browse files
authored
Introduce high level client (#25086)
The high level client supports the following apis: ping, info, index, bulk, get, delete, update, search, search scroll and clear scroll. Also, the BulkProcessor has been updated so that it can be used with the high level client as well.
1 parent c0092b8 commit 55f968c

File tree

45 files changed

+5327
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5327
-326
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Licensed to Elasticsearch under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on
13+
# an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14+
# either express or implied. See the License for the specific
15+
# language governing permissions and limitations under the License.
16+
17+
@defaultMessage Explicitly specify the ContentType of HTTP entities when creating
18+
org.apache.http.entity.StringEntity#<init>(java.lang.String)
19+
org.apache.http.entity.StringEntity#<init>(java.lang.String,java.lang.String)
20+
org.apache.http.entity.StringEntity#<init>(java.lang.String,java.nio.charset.Charset)
21+
org.apache.http.entity.ByteArrayEntity#<init>(byte[])
22+
org.apache.http.entity.ByteArrayEntity#<init>(byte[],int,int)
23+
org.apache.http.entity.FileEntity#<init>(java.io.File)
24+
org.apache.http.entity.InputStreamEntity#<init>(java.io.InputStream)
25+
org.apache.http.entity.InputStreamEntity#<init>(java.io.InputStream,long)
26+
org.apache.http.nio.entity.NByteArrayEntity#<init>(byte[])
27+
org.apache.http.nio.entity.NByteArrayEntity#<init>(byte[],int,int)
28+
org.apache.http.nio.entity.NFileEntity#<init>(java.io.File)
29+
org.apache.http.nio.entity.NStringEntity#<init>(java.lang.String)
30+
org.apache.http.nio.entity.NStringEntity#<init>(java.lang.String,java.lang.String)
31+
32+
@defaultMessage Use non-deprecated constructors
33+
org.apache.http.nio.entity.NFileEntity#<init>(java.io.File,java.lang.String)
34+
org.apache.http.nio.entity.NFileEntity#<init>(java.io.File,java.lang.String,boolean)
35+
org.apache.http.entity.FileEntity#<init>(java.io.File,java.lang.String)
36+
org.apache.http.entity.StringEntity#<init>(java.lang.String,java.lang.String,java.lang.String)
37+
38+
@defaultMessage BasicEntity is easy to mess up and forget to set content type
39+
org.apache.http.entity.BasicHttpEntity#<init>()
40+
41+
@defaultMessage EntityTemplate is easy to mess up and forget to set content type
42+
org.apache.http.entity.EntityTemplate#<init>(org.apache.http.entity.ContentProducer)
43+
44+
@defaultMessage SerializableEntity uses java serialization and makes it easy to forget to set content type
45+
org.apache.http.entity.SerializableEntity#<init>(java.io.Serializable)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import org.elasticsearch.gradle.precommit.PrecommitTasks
2+
3+
/*
4+
* Licensed to Elasticsearch under one or more contributor
5+
* license agreements. See the NOTICE file distributed with
6+
* this work for additional information regarding copyright
7+
* ownership. Elasticsearch licenses this file to you under
8+
* the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing,
15+
* software distributed under the License is distributed on an
16+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
* KIND, either express or implied. See the License for the
18+
* specific language governing permissions and limitations
19+
* under the License.
20+
*/
21+
apply plugin: 'elasticsearch.build'
22+
apply plugin: 'elasticsearch.rest-test'
23+
24+
group = 'org.elasticsearch.client'
25+
26+
dependencies {
27+
compile "org.elasticsearch:elasticsearch:${version}"
28+
compile "org.elasticsearch.client:rest:${version}"
29+
compile "org.elasticsearch.plugin:parent-join-client:${version}"
30+
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
31+
32+
testCompile "org.elasticsearch.client:test:${version}"
33+
testCompile "org.elasticsearch.test:framework:${version}"
34+
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
35+
testCompile "junit:junit:${versions.junit}"
36+
testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"
37+
}
38+
39+
dependencyLicenses {
40+
// Don't check licenses for dependency that are part of the elasticsearch project
41+
// But any other dependency should have its license/notice/sha1
42+
dependencies = project.configurations.runtime.fileCollection {
43+
it.group.startsWith('org.elasticsearch') == false
44+
}
45+
}
46+
47+
forbiddenApisMain {
48+
// core does not depend on the httpclient for compile so we add the signatures here. We don't add them for test as they are already
49+
// specified
50+
signaturesURLs += [PrecommitTasks.getResource('/forbidden/http-signatures.txt')]
51+
}

0 commit comments

Comments
 (0)