Skip to content

Commit a1d3cb3

Browse files
committed
Fix docs for scoring examples
1 parent b5c94d3 commit a1d3cb3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/reference/esql/esql-limitations.asciidoc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,27 @@ FROM books
134134
| WHERE MATCH(author, "Faulkner")
135135
----
136136

137-
And this query will fail due to the disjunction:
137+
And this query that uses a disjunction will succeed:
138138

139139
[source,esql]
140140
----
141141
FROM books
142+
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
143+
----
144+
145+
However using scoring will fail because it uses a non full text function as part of the disjunction:
146+
147+
[source,esql]
148+
----
149+
FROM books METADATA _score
142150
| WHERE MATCH(author, "Faulkner") OR author LIKE "Hemingway"
143151
----
144152

145-
However this query will succeed because it uses full text functions on both `OR` clauses:
153+
Scoring will work in the following query, as it uses full text functions on both `OR` clauses:
146154

147155
[source,esql]
148156
----
149-
FROM books
157+
FROM books METADATA _score
150158
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
151159
----
152160

0 commit comments

Comments
 (0)