Skip to content
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

[DOCS] Cleansify painless-api-reference which autogenerates documentation for some xpack content #140

Closed
setiah opened this issue Feb 25, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation >FORK Related to the fork process :xpack-removal Related to removal of x-pack

Comments

@setiah
Copy link
Contributor

setiah commented Feb 25, 2021

painless/painless-api-reference/painless-api-reference-aggregation-selector/packages.asciidoc:[role="exclude",id="painless-api-reference-aggregation-selector-org-elasticsearch-xpack-sql-expression-literal-geo"]
painless/painless-api-reference/painless-api-reference-aggregation-selector/packages.asciidoc:=== Aggregation Selector API for package org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-aggregation-selector/packages.asciidoc:[role="exclude",id="painless-api-reference-aggregation-selector-org-elasticsearch-xpack-sql-expression-literal-interval"]
painless/painless-api-reference/painless-api-reference-aggregation-selector/packages.asciidoc:=== Aggregation Selector API for package org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-aggregation-selector/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-aggregation-selector/index.asciidoc:<<painless-api-reference-aggregation-selector-org-elasticsearch-xpack-sql-expression-literal-geo, Expand details for org.elasticsearch.xpack.sql.expression.literal.geo>>
painless/painless-api-reference/painless-api-reference-aggregation-selector/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-aggregation-selector/index.asciidoc:<<painless-api-reference-aggregation-selector-org-elasticsearch-xpack-sql-expression-literal-interval, Expand details for org.elasticsearch.xpack.sql.expression.literal.interval>>
painless/painless-api-reference/painless-api-reference-score/packages.asciidoc:[role="exclude",id="painless-api-reference-score-org-elasticsearch-xpack-vectors-query"]
painless/painless-api-reference/painless-api-reference-score/packages.asciidoc:=== Score API for package org.elasticsearch.xpack.vectors.query
painless/painless-api-reference/painless-api-reference-score/index.asciidoc:==== org.elasticsearch.xpack.vectors.query
painless/painless-api-reference/painless-api-reference-score/index.asciidoc:<<painless-api-reference-score-org-elasticsearch-xpack-vectors-query, Expand details for org.elasticsearch.xpack.vectors.query>>
painless/painless-api-reference/painless-api-reference-field/packages.asciidoc:[role="exclude",id="painless-api-reference-field-org-elasticsearch-xpack-sql-expression-literal-geo"]
painless/painless-api-reference/painless-api-reference-field/packages.asciidoc:=== Field API for package org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-field/packages.asciidoc:[role="exclude",id="painless-api-reference-field-org-elasticsearch-xpack-sql-expression-literal-interval"]
painless/painless-api-reference/painless-api-reference-field/packages.asciidoc:=== Field API for package org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-field/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-field/index.asciidoc:<<painless-api-reference-field-org-elasticsearch-xpack-sql-expression-literal-geo, Expand details for org.elasticsearch.xpack.sql.expression.literal.geo>>
painless/painless-api-reference/painless-api-reference-field/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-field/index.asciidoc:<<painless-api-reference-field-org-elasticsearch-xpack-sql-expression-literal-interval, Expand details for org.elasticsearch.xpack.sql.expression.literal.interval>>
painless/painless-api-reference/painless-api-reference-string-sort/packages.asciidoc:[role="exclude",id="painless-api-reference-string-sort-org-elasticsearch-xpack-sql-expression-literal-geo"]
painless/painless-api-reference/painless-api-reference-string-sort/packages.asciidoc:=== String Sort API for package org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-string-sort/packages.asciidoc:[role="exclude",id="painless-api-reference-string-sort-org-elasticsearch-xpack-sql-expression-literal-interval"]
painless/painless-api-reference/painless-api-reference-string-sort/packages.asciidoc:=== String Sort API for package org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-string-sort/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-string-sort/index.asciidoc:<<painless-api-reference-string-sort-org-elasticsearch-xpack-sql-expression-literal-geo, Expand details for org.elasticsearch.xpack.sql.expression.literal.geo>>
painless/painless-api-reference/painless-api-reference-string-sort/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-string-sort/index.asciidoc:<<painless-api-reference-string-sort-org-elasticsearch-xpack-sql-expression-literal-interval, Expand details for org.elasticsearch.xpack.sql.expression.literal.interval>>
painless/painless-api-reference/painless-api-reference-number-sort/packages.asciidoc:[role="exclude",id="painless-api-reference-number-sort-org-elasticsearch-xpack-sql-expression-literal-geo"]
painless/painless-api-reference/painless-api-reference-number-sort/packages.asciidoc:=== Number Sort API for package org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-number-sort/packages.asciidoc:[role="exclude",id="painless-api-reference-number-sort-org-elasticsearch-xpack-sql-expression-literal-interval"]
painless/painless-api-reference/painless-api-reference-number-sort/packages.asciidoc:=== Number Sort API for package org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-number-sort/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-number-sort/index.asciidoc:<<painless-api-reference-number-sort-org-elasticsearch-xpack-sql-expression-literal-geo, Expand details for org.elasticsearch.xpack.sql.expression.literal.geo>>
painless/painless-api-reference/painless-api-reference-number-sort/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-number-sort/index.asciidoc:<<painless-api-reference-number-sort-org-elasticsearch-xpack-sql-expression-literal-interval, Expand details for org.elasticsearch.xpack.sql.expression.literal.interval>>
painless/painless-api-reference/painless-api-reference-aggs/packages.asciidoc:[role="exclude",id="painless-api-reference-aggs-org-elasticsearch-xpack-sql-expression-literal-geo"]
painless/painless-api-reference/painless-api-reference-aggs/packages.asciidoc:=== Aggs API for package org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-aggs/packages.asciidoc:[role="exclude",id="painless-api-reference-aggs-org-elasticsearch-xpack-sql-expression-literal-interval"]
painless/painless-api-reference/painless-api-reference-aggs/packages.asciidoc:=== Aggs API for package org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-aggs/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-aggs/index.asciidoc:<<painless-api-reference-aggs-org-elasticsearch-xpack-sql-expression-literal-geo, Expand details for org.elasticsearch.xpack.sql.expression.literal.geo>>
painless/painless-api-reference/painless-api-reference-aggs/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-aggs/index.asciidoc:<<painless-api-reference-aggs-org-elasticsearch-xpack-sql-expression-literal-interval, Expand details for org.elasticsearch.xpack.sql.expression.literal.interval>>
painless/painless-api-reference/painless-api-reference-filter/packages.asciidoc:[role="exclude",id="painless-api-reference-filter-org-elasticsearch-xpack-sql-expression-literal-geo"]
painless/painless-api-reference/painless-api-reference-filter/packages.asciidoc:=== Filter API for package org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-filter/packages.asciidoc:[role="exclude",id="painless-api-reference-filter-org-elasticsearch-xpack-sql-expression-literal-interval"]
painless/painless-api-reference/painless-api-reference-filter/packages.asciidoc:=== Filter API for package org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-filter/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.geo
painless/painless-api-reference/painless-api-reference-filter/index.asciidoc:<<painless-api-reference-filter-org-elasticsearch-xpack-sql-expression-literal-geo, Expand details for org.elasticsearch.xpack.sql.expression.literal.geo>>
painless/painless-api-reference/painless-api-reference-filter/index.asciidoc:==== org.elasticsearch.xpack.sql.expression.literal.interval
painless/painless-api-reference/painless-api-reference-filter/index.asciidoc:<<painless-api-reference-filter-org-elasticsearch-xpack-sql-expression-literal-interval, Expand details for org.elasticsearch.xpack.sql.expression.literal.interval>>
@setiah setiah added documentation Improvements or additions to documentation :xpack-removal Related to removal of x-pack >FORK Related to the fork process labels Feb 25, 2021
@tlfeng
Copy link
Collaborator

tlfeng commented Feb 27, 2021

The whole docs/painless/painless-api-reference folder can be generated by ./gradlew :module:lang-painless:generateContextDoc, the gradle task was introduced in the commit elastic/elasticsearch@9fc0e81

The below was the additional difference with the above PR:
For the removed API, I validated that they were not used in our repository. But for the removed links in the last file, I think it was a mistake because the original links are valid.

in docs/painless/painless-api-reference/painless-api-reference-field/index.asciidoc:
these lines were removed

==== Static Methods
The following methods are directly callable without a class/instance qualifier. Note parameters denoted by a (*) are treated as read-only values.

* List domainSplit(String)
* List domainSplit(String, Map)

In docs/painless/painless-api-reference/painless-api-reference-score/index.asciidoc:
these lines were removed

* double cosineSimilarity(List *, Object *)
* double cosineSimilaritySparse(Map *, Object *)
...
* double dotProduct(List *, Object *)
* double dotProductSparse(Map *, Object *)
* double l1norm(List *, Object *)
* double l1normSparse(Map *, Object *)
* double l2norm(List *, Object *)
* double l2normSparse(Map *, Object *)

In docs/painless/painless-api-reference/painless-api-reference-shared/packages.asciidoc:

* Matcher {java11-javadoc}/java.base/java/util/regex/Pattern.html#matcher(java.lang.CharSequence)[matcher](CharSequence)
* null {java11-javadoc}/java.base/java/util/regex/Pattern.html#pattern()[pattern]()
* null[] {java11-javadoc}/java.base/java/util/regex/Pattern.html#split(java.lang.CharSequence)[split](CharSequence)
* null[] {java11-javadoc}/java.base/java/util/regex/Pattern.html#split(java.lang.CharSequence,int)[split](CharSequence, int)
* Stream {java11-javadoc}/java.base/java/util/regex/Pattern.html#splitAsStream(java.lang.CharSequence)[splitAsStream](CharSequence)

were changed to

* Matcher matcher(CharSequence)
* null {java11-javadoc}/java.base/java/util/regex/Pattern.html#pattern()[pattern]()
* null[] split(CharSequence)
* null[] split(CharSequence, int)
* Stream splitAsStream(CharSequence)

@tlfeng
Copy link
Collaborator

tlfeng commented Feb 27, 2021

I pushed a commit 049d018 to the PR above to removed the reference for the unused APIs in:
docs/painless/painless-api-reference/painless-api-reference-field/index.asciidoc and
docs/painless/painless-api-reference/painless-api-reference-score/index.asciidoc

@tlfeng
Copy link
Collaborator

tlfeng commented Mar 9, 2021

PR #151 that resolves the issue has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation >FORK Related to the fork process :xpack-removal Related to removal of x-pack
Projects
None yet
Development

No branches or pull requests

2 participants