-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Match, Like and RLike operators improved docs #120504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match, Like and RLike operators improved docs #120504
Conversation
Documentation preview: |
…ed-docs' into docs/match-operator-improved-docs
Pinging @elastic/es-docs (Team:Docs) |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Pinging @elastic/kibana-esql (ES|QL-ui) |
...ugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchOperator.java
Outdated
Show resolved
Hide resolved
* Unlike other ESQL functions, Match is both a function and an operator. This class provides implementation for both, | ||
* but the operator documentation is generated in {@link MatchOperator}. | ||
*/ | ||
public class Match extends FullTextFunction implements PostOptimizationVerificationAware { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do wonder if Match should be abstract, with a MatchFunction and MatchOperator subclasses? Which would make the distinction between them more obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's something we didn't do back in the day, mostly because there were fewer differences. I think it makes sense now.
I implemented that separation in ed10886. @fang-xing-esql @ChrisHegarty , do you think it makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
…an focus on the differences
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
💔 Backport failed
You can use sqren/backport to manually backport by running |
Match is both a function and an operator. This caused some problems rendering docs as functions are not expected to be both.
This PR creates a new
MatchOperator
class that contains the updatedFunctionInfo
annotation for the operator, thus separating the Match function and the operator.MatchOperatorTests
have been modified so the newMatchOperator
class is used to generate the docs.LIKE
andRLIKE
operators are marked as such as well in this PR