GET /reviews/_search
{
"query": {
"match_all": {
}
}
}
GET /reviews/_search?q=*
# Search using Request URI
GET /reviews/_search?q=content:Matrix AND author.first_name:taylor
Using _score
provides relavance score of a document
GET /products/_search
{
"explain": true,
"query": {
"term": {
"name": "lobster"
}
}
}
Term level queries search for exact matches and hence not analyzed versus full text queries are analyzed
Term level queries will result in zero results because it relies on exact match
GET /products/_search
{
"query": {
"term": {
"name": "Lobster"
}
}
}
Whereas full text queries, it will be able to find the match regardless of case.
GET /products/_search
{
"query": {
"match": {
"name": "Lobster"
}
}
}