Exact search - Fluid Topics

AFS Taruqa

Category
Technical Notes
Audience
public

Surrounding a term or a sequence of terms with double quotes " makes these terms mandatory and limits the processing applied to normalization (normalizing case and accents).

For example, the reply to the following query only includes documents containing terms that are normalized to "guides" ("guides", "Guides", "GUIDES", etc.) Documents containing terms with the same stemmed form as "guides", such as "guide" or "guided", are not included in the result.

{"terms": {"query": "\"guides\""}}

Using multiple terms in a single pair of double quotes makes the whole sequence mandatory (that is terms in the same order without any additional terms between them). For example, the reply to the following query will only contain documents containing "user guide":

{"terms": {"query": "\"user guide\""}}

While the reply to the following query will only contain documents containing both "user" and "guide":

{"terms": {"query": "\"user\" \"guide\""}}
In case of an odd number of double quotes, pairs are matched up left to right, and the remaining double quote is ignored.

For example, the following queries are equivalent:

{"ow": {"query": "\"user\" guided \""}}
{"ow": {"query": "\"user\" guided"}}