Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```json
- GET _search
- {
- "query": {
- "match_all": {}
- }
- }
- GET /
- # Lab 3: CRUD Operations
- PUT my_blogs/_doc/1
- {
- "id": "1",
- "title": "Better query execution",
- "category": "Engineering",
- "date":"July 15, 2015",
- "author":{
- "first_name": "Adrian",
- "last_name": "Grand",
- "company": "Elastic"
- }
- }
- PUT my_blogs/_doc/2
- {
- "id": "2",
- "title": "The Story of Sense",
- "date":"May 28, 2015",
- "author":{
- "first_name": "Boaz",
- "last_name": "Leskes"
- }
- }
- POST my_blogs/_doc/
- {
- "id": "57",
- "title": "Phrase Queries: a world without Stopwords",
- "date":"March 7, 2016",
- "category": "Engineering",
- "author":{
- "first_name": "Gabriel",
- "last_name": "Moskovicz"
- }
- }
- GET my_blogs/_doc/1
- DELETE my_blogs/_doc/1
- GET my_blogs/_doc/1
- POST my_blogs/_bulk
- {"update": {"_id": 2}}
- {"doc": {"category": "Engineering", "author.company":"Elastic"}}
- {"index": {"_id": 3}}
- {"title":"Using Elastic Graph","category":"Engineering","date":"May 25, 2016","author":{"first_name":"Mark","last_name":"Harwood","company":"Elastic"}}
- GET my_blogs/_search
- GET my_blogs/_mget
- {
- "docs": [
- {"_id":2},
- {"_id":3}
- ]
- }
- DELETE my_blogs
- # see all indices
- GET _cat/indices
- # search all documents in index
- GET blogs/_search
- # num of docs in index
- GET blogs/_count
- GET logs_server1,logs_server2,logs_server3/_count
- GET logs_server*/_count
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement