You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[preview] {{esql}}'s support for [full-text search](/reference/query-languages/esql/esql-functions-operators.md#esql-search-functions) is currently in Technical Preview. One limitation of full-text search is that it is necessary to use the search function, like [`MATCH`](/reference/query-languages/esql/esql-functions-operators.md#esql-match), in a [`WHERE`](/reference/query-languages/esql/esql-commands.md#esql-where) command directly after the [`FROM`](/reference/query-languages/esql/esql-commands.md#esql-from) source command, or close enough to it. Otherwise, the query will fail with a validation error. Another limitation is that any [`WHERE`](/reference/query-languages/esql/esql-commands.md#esql-where) command containing a full-text search function cannot use disjunctions (`OR`), unless:
121
-
122
-
* All functions used in the OR clauses are full-text functions themselves, or scoring is not used
120
+
[preview] {{esql}}'s support for [full-text search](/reference/query-languages/esql/esql-functions-operators.md#esql-search-functions) is currently in Technical Preview. One limitation of full-text search is that it is necessary to use the search function, like [`MATCH`](/reference/query-languages/esql/esql-functions-operators.md#esql-match), in a [`WHERE`](/reference/query-languages/esql/esql-commands.md#esql-where) command directly after the [`FROM`](/reference/query-languages/esql/esql-commands.md#esql-from) source command, or close enough to it. Otherwise, the query will fail with a validation error.
123
121
124
122
For example, this query is valid:
125
123
@@ -136,27 +134,6 @@ FROM books
136
134
| WHERE MATCH(author, "Faulkner")
137
135
```
138
136
139
-
And this query that uses a disjunction will succeed:
140
-
141
-
```esql
142
-
FROM books
143
-
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
144
-
```
145
-
146
-
However using scoring will fail because it uses a non full text function as part of the disjunction:
147
-
148
-
```esql
149
-
FROM books METADATA _score
150
-
| WHERE MATCH(author, "Faulkner") OR author LIKE "Hemingway"
151
-
```
152
-
153
-
Scoring will work in the following query, as it uses full text functions on both `OR` clauses:
154
-
155
-
```esql
156
-
FROM books METADATA _score
157
-
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
158
-
```
159
-
160
137
Note that, because of [the way {{esql}} treats `text` values](#esql-limitations-text-fields), any queries on `text` fields that do not explicitly use the full-text functions, [`MATCH`](/reference/query-languages/esql/esql-functions-operators.md#esql-match), [`QSTR`](/reference/query-languages/esql/esql-functions-operators.md#esql-qstr) or [`KQL`](/reference/query-languages/esql/esql-functions-operators.md#esql-kql), will behave as if the fields are actually `keyword` fields: they are case-sensitive and need to match the full string.
0 commit comments