The documents has to be indexed for it to be searched in Elasticsearch. The document that we have indexed can be searched via the _search
url with any of the following queries (each query has a different purpose):
GET {index-name}/_search
Searches for all the documents in an index are as shown here:
GET datalake/_search
Figure 27: Query to Get All Documents In an Index via Search URI
GET {index-name}/{type}/_search
Searches for all the documents belonging to a type in an index are as shown here:
GET datalake/contacts/_search
Figure 28: Query to Get All Documents of a Type in an Index
POST {index-name}/{type}/_search
Searches for all the documents belonging to a type in an index searched by the parameters specified in the POST are as shown here:
POST datalake/contacts/_search { "query": { "term": { "email" : "vincenzo.hickle"} } } POST datalake/contacts/_search { "query": { "term": { "email" : "yahoo.com"} } } POST datalake/contacts/_search { "query": { ...