Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/description/categorize.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions docs/reference/esql/functions/kibana/definition/categorize.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/docs/categorize.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions docs/reference/esql/functions/layout/categorize.asciidoc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this to work and be in the docs, it also has to be linked in one of the root asciidocs.
In this case, it would be this one: https://github.com/elastic/elasticsearch/blob/a21242054b87e456f6e301dfa017e612b83ebbd6/docs/reference/esql/functions/grouping-functions.asciidoc

That said, do we want to include snapshot-only functions in the global docs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the files without plugging them in shouldn't hurt anything if that's what we want to do. I think we're ok doing that. I am. We should just make sure folks know having the generated asciidoc doesn't mean it's there - you have to look for the inclusion. For qstr I believe the plan is to include it only in snapshot docs. INLINESTATS works that way:

ifeval::["{release-state}"=="unreleased"]
* experimental:[] <<esql-inlinestats-by>>
endif::[]

...

ifeval::["{release-state}"=="unreleased"]
include::processing-commands/inlinestats.asciidoc[]
endif::[]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the files without plugging them in shouldn't hurt anything

Indeed, but I feel like adding those without actually including them leaves things half-done. And it's harder later to know which ones are missing.

Btw, didn't know we had those conditionals! I'd include it with them, and that's all. About making sure it's done, it feels a bit more complex, and I can't think of a good way that doesn't pass through autogenerating those files too 👀 (Which feels like the eventual solution...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct - for now, we're not including the docs as these functions are not production ready yet.

Including functions docs should be ok if they are not linked to the global docs - they can exist but not be connected until we do so for production readiness.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/reference/esql/functions/parameters/categorize.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/reference/esql/functions/signature/categorize.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/reference/esql/functions/types/categorize.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class Categorize extends GroupingFunction implements Validatable {

private final Expression field;

@FunctionInfo(returnType = { "integer" }, description = "Categorizes text messages")
@FunctionInfo(returnType = { "integer" }, description = "Categorizes text messages.")
public Categorize(
Source source,
@Param(name = "field", type = { "text", "keyword" }, description = "Expression to categorize") Expression field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ protected static String functionName() {
}

private static FunctionDefinition definition(String name) {
EsqlFunctionRegistry registry = new EsqlFunctionRegistry();
EsqlFunctionRegistry registry = new EsqlFunctionRegistry().snapshotRegistry();
if (registry.functionExists(name)) {
return registry.resolveFunction(name);
}
Expand Down
Loading