Skip to content

Commit

Permalink
Fix docs for scoring examples
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Jan 21, 2025
1 parent b5c94d3 commit a1d3cb3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/reference/esql/esql-limitations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,27 @@ FROM books
| WHERE MATCH(author, "Faulkner")
----

And this query will fail due to the disjunction:
And this query that uses a disjunction will succeed:

[source,esql]
----
FROM books
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
----

However using scoring will fail because it uses a non full text function as part of the disjunction:

[source,esql]
----
FROM books METADATA _score
| WHERE MATCH(author, "Faulkner") OR author LIKE "Hemingway"
----

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

[source,esql]
----
FROM books
FROM books METADATA _score
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
----

Expand Down

0 comments on commit a1d3cb3

Please sign in to comment.