Phrase Query
Edit pageA phrase is surrounded with double quotes ("") and allows searching for a
specific exact phrase and returns only matches where all terms appear in the
document in the correct order, giving a weight of the sum of each term.
For example:
- Documents which match A followed by B followed by C gives a weight of A+B+C
A wildcard, fuzzy word or group inside a phrase is refused with 400: a phrase is made of
plain words.
Example
Section titled “Example”In the following example, we will retrieve documents with the exact phrase,
including the stop words these, come, a and of.
SEARCH /bank/
{ "_query": { "personality": "\"these come alongside a habit of\"" }}SEARCH /bank/
{ "_query": { "personality": { "_phrase": "these come alongside a habit of" } }}