Skip to content

Commit 0b4f3a2

Browse files
committed
Merge pull request hmalphettes#6 from nichoth/master
syntax highlighting in readme
2 parents 44cc4df + 8439475 commit 0b4f3a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See the examples and tests with the official Elasticsearch-js client.
1313
# Examples:
1414

1515
## Stream random records into Elasticsearch
16-
```
16+
```js
1717
var WritableBulk = require('elasticsearch-streams').WritableBulk;
1818
var client = new require('elasticsearch').Client();
1919

@@ -38,14 +38,14 @@ https://github.com/joyent/node/issues/5315#issuecomment-16670354
3838

3939
For example to close the ES client as soon as we are done:
4040

41-
```
41+
```js
4242
ws.on('close', function () {
4343
client.close();
4444
});
4545
```
4646

4747
## Stream search results from Elasticsearch
48-
```
48+
```js
4949
var ReadableSearch = require('elasticsearch-streams').ReadableSearch;
5050
var client = new require('elasticsearch').Client();
5151

@@ -72,7 +72,7 @@ rs.pipe(ws).on('close', done);
7272

7373
If we want to start the stream at an offset and define a limit:
7474

75-
```
75+
```js
7676
var offset = 7;
7777
var limit = 21;
7878
var page = 12;
@@ -90,7 +90,7 @@ var searchExec = function searchExec(from, callback) {
9090
```
9191

9292
## Stream scroll/scan results from Elasticsearch
93-
```
93+
```js
9494
var scrollExec = function scrollExec(from, callback) {
9595
if (this.scroll_id) {
9696
return client.scroll({
@@ -116,7 +116,7 @@ rs = new ReadableSearch(scrollExec);
116116
```
117117

118118
## Stream IDs into Elasticsearch multi-get and get documents out.
119-
```
119+
```js
120120
var mgetExec = function(docs, callback) {
121121
client.mget({
122122
index: 'myindex',

0 commit comments

Comments
 (0)