Skip to content

Commit 8adc174

Browse files
authored
Merge pull request elastic#42 from elastic/philkra-patch-1
Reduce README to emphasise deprecation
2 parents 8a6b5e6 + 8cc8186 commit 8adc174

File tree

1 file changed

+7
-101
lines changed

1 file changed

+7
-101
lines changed

README.md

Lines changed: 7 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,19 @@
11
# elasticsearch.js 16.7.2
22

3-
---
4-
5-
#### We have released the [new JavaScript client](https://www.elastic.co/blog/new-elasticsearch-javascript-client-released)!
6-
* This client is no longer maintained. We strongly advise you to migrate to the new client.<br/>
7-
We have built a [migration guide](https://www.elastic.co/guide/en/elasticsearch/client/elasticsearch-js/current/breaking-changes.html) that will help you move to the new client quickly. If you have questions or need help, please [open an issue](https://github.com/elastic/elasticsearch-js/issues/new/choose).*
3+
⚠️ **This client is no longer maintained. We strongly advise you to migrate to the [new Elasticsearch client](https://github.com/elastic/elasticsearch-js).**
84

95
---
106

11-
The official low-level Elasticsearch client for Node.js and the browser.
12-
13-
[![Coverage Status](http://img.shields.io/coveralls/elastic/elasticsearch-js/master.svg?style=flat-square)](https://coveralls.io/r/elastic/elasticsearch-js?branch=master)
14-
[![Dependencies up to date](http://img.shields.io/david/elastic/elasticsearch-js.svg?style=flat-square)](https://david-dm.org/elastic/elasticsearch-js)
15-
16-
## Features
17-
18-
- One-to-one mapping with REST API and the other official clients
19-
- Generalized, pluggable architecture.
20-
- Configurable, automatic discovery of cluster nodes
21-
- Persistent, Keep-Alive connections
22-
- Load balancing (with pluggable selection strategy) across all available nodes.
23-
24-
## Use in Node.js
25-
26-
```
27-
npm install elasticsearch
28-
```
29-
30-
[![NPM Stats](https://nodei.co/npm/elasticsearch.png?downloads=true)](https://npmjs.org/package/elasticsearch)
31-
32-
## Docs
33-
34-
Documentation can be found on [elastic.co](https://www.elastic.co/guide/en/elasticsearch/client/elasticsearch-js/16.x/index.html).
7+
Please read the [announcement of the new Elasticsearch JavaScript client](https://www.elastic.co/blog/new-elasticsearch-javascript-client-released) or navigate to the [repository directly](https://github.com/elastic/elasticsearch-js).
358

36-
## Supported Elasticsearch Versions
9+
We have built a [migration guide](https://www.elastic.co/guide/en/elasticsearch/client/elasticsearch-js/current/breaking-changes.html) that will help you move to the new client quickly. If you have questions or need help, please [open an issue](https://github.com/elastic/elasticsearch-js/issues/new/choose).
3710

38-
Elasticsearch.js provides support for, and is regularly tested against, Elasticsearch releases 0.90.12 and greater. We also test against the latest changes in several branches in the Elasticsearch repository. To tell the client which version of Elasticsearch you are using, and therefore the API it should provide, set the `apiVersion` config param.
39-
40-
## Examples
41-
42-
Create a client instance
43-
```js
44-
var elasticsearch = require('elasticsearch');
45-
var client = new elasticsearch.Client({
46-
host: 'localhost:9200',
47-
log: 'trace',
48-
apiVersion: '7.2', // use the same version of your Elasticsearch instance
49-
});
50-
```
51-
52-
Send a HEAD request to `/` and allow up to 1 second for it to complete.
53-
```js
54-
client.ping({
55-
// ping usually has a 3000ms timeout
56-
requestTimeout: 1000
57-
}, function (error) {
58-
if (error) {
59-
console.trace('elasticsearch cluster is down!');
60-
} else {
61-
console.log('All is well');
62-
}
63-
});
64-
```
65-
66-
Skip the callback to get a promise back
67-
```js
68-
try {
69-
const response = await client.search({
70-
q: 'pants'
71-
});
72-
console.log(response.hits.hits)
73-
} catch (error) {
74-
console.trace(error.message)
75-
}
76-
```
11+
---
7712

78-
Find tweets that have "elasticsearch" in their body field
79-
```js
80-
const response = await client.search({
81-
index: 'twitter',
82-
type: 'tweets',
83-
body: {
84-
query: {
85-
match: {
86-
body: 'elasticsearch'
87-
}
88-
}
89-
}
90-
})
13+
## Documentation
9114

92-
for (const tweet of response.hits.hits) {
93-
console.log('tweet:', tweet);
94-
}
95-
```
15+
Please refer to [elastic.co](https://www.elastic.co/guide/en/elasticsearch/client/elasticsearch-js/16.x/index.html) for client docs.
9616

9717
## License
9818

99-
This software is licensed under the Apache 2 license, quoted below.
100-
101-
Copyright (c) 2014 Elasticsearch <http://www.elasticsearch.org>
102-
103-
Licensed under the Apache License, Version 2.0 (the "License");
104-
you may not use this file except in compliance with the License.
105-
You may obtain a copy of the License at
106-
107-
http://www.apache.org/licenses/LICENSE-2.0
108-
109-
Unless required by applicable law or agreed to in writing, software
110-
distributed under the License is distributed on an "AS IS" BASIS,
111-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112-
See the License for the specific language governing permissions and
113-
limitations under the License.
19+
This software is licensed under the Apache 2 license, see [LICENSE](https://github.com/elastic/elasticsearch-js-legacy/blob/16.x/LICENSE).

0 commit comments

Comments
 (0)