-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Adds doc examples for Elasticsearch Quick start guide
- Loading branch information
1 parent
1e3561e
commit 224872a
Showing
5 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[source, ruby] | ||
---- | ||
response = client.search( | ||
index: 'books', | ||
body: { query: { match: { name: 'brave' } } } | ||
) | ||
puts response | ||
---- |
5 changes: 5 additions & 0 deletions
5
docs/examples/guide/3d1ff6097e2359f927c88c2ccdb36252.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[source, ruby] | ||
---- | ||
response = client.info | ||
puts response | ||
---- |
13 changes: 13 additions & 0 deletions
13
docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[source, ruby] | ||
---- | ||
response = client.index( | ||
index: 'books', | ||
body: { | ||
name: 'Snow Crash', | ||
author: 'Neal Stephenson', | ||
release_date: '1992-06-01', | ||
page_count: 470 | ||
} | ||
) | ||
puts response | ||
---- |
7 changes: 7 additions & 0 deletions
7
docs/examples/guide/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[source, ruby] | ||
---- | ||
response = client.search( | ||
index: 'books' | ||
) | ||
puts response | ||
---- |
18 changes: 18 additions & 0 deletions
18
docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[source, ruby] | ||
---- | ||
response = client.bulk( | ||
body: [ | ||
{ index: { _index: 'books' } }, | ||
{ name: 'Revelation Space', author: 'Alastair Reynolds', release_date: '2000-03-15', page_count: 585}, | ||
{ index: { _index: 'books' } }, | ||
{ name: '1984', author: 'George Orwell', release_date: '1985-06-01', page_count: 328}, | ||
{ index: { _index: 'books' } }, | ||
{ name: 'Fahrenheit 451', author: 'Ray Bradbury', release_date: '1953-10-15', page_count: 227}, | ||
{ index: { _index: 'books' } }, | ||
{ name: 'Brave New World', author: 'Aldous Huxley', release_date: '1932-06-01', page_count: 268}, | ||
{ index: { _index: 'books' } }, | ||
{ name: 'The Handmaids Tale', author: 'Margaret Atwood', release_date: '1985-06-01', page_count: 311} | ||
] | ||
) | ||
puts response | ||
---- |