Skip to content

Conversation

@ritvibhatt
Copy link
Contributor

@ritvibhatt ritvibhatt commented Oct 15, 2025

This PR standardizes the structure and content of PPL command documentation files to improve consistency and user experience.

Changes Made

Documentation Structure Standardization

Implemented consistent section ordering across all PPL command files:

  1. Description - Clear explanation of command functionality
  2. Syntax - Command syntax with parameter details
  3. Optional sections - Behavior notes, configuration details, or usage guidance as needed
  4. Examples - Practical usage examples with expected output
  5. Limitations - Known constraints or considerations

Content Cleanup and Modernization

  • Removed version information - Eliminated outdated version references (e.g., "Version:
    3.3.0") to keep documentation current and reduce maintenance overhead
  • Extracted aggregation functions - Moved aggregation function documentation to dedicated
    functions file (/functions/aggregations.rst) for better organization

Related Issues

Resolves #[Issue number to be closed when this PR is merged]
#4220

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Ritvi Bhatt <[email protected]>
Signed-off-by: Ritvi Bhatt <[email protected]>
@ritvibhatt ritvibhatt marked this pull request as draft October 15, 2025 04:13
Signed-off-by: Ritvi Bhatt <[email protected]>
@ritvibhatt
Copy link
Contributor Author

Hi @ritvibhatt, thanks for the changes! Quick question: should we also update the documentation in condition.rst for recently added functions like coalesce?

Hi @aalva500-prog, thanks for bringing that up! I have now updated the functions documentation as well

@ahkcs
Copy link
Contributor

ahkcs commented Oct 28, 2025

Hi @ritvibhatt , reviewed bin, replace, fillnull commands and I think it looks good, for multisearch command, can you rebase it due to the newly merged PR: #4512? Thanks!

Swiddis
Swiddis previously approved these changes Oct 29, 2025
Copy link
Collaborator

@Swiddis Swiddis left a comment

Choose a reason for hiding this comment

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

crashes my web viewer of the diff, lgtm

============================================================== ================== ======================== ==============================================================================================
Command Name Version Introduced Current Status Command Description
============================================================== ================== ======================== ==============================================================================================
`search command <cmd/search.rst>`_ 1.0 stable (since 1.0) Retrieve documents from the index.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice work on the summaries

* **Functions**

- `top command <cmd/top.rst>`_
- `Aggregation Functions <functions/aggregation.rst>`_
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Should we have descriptions or some further info for these too?

Not clear how to find e.g. the SUM function (is it an aggregation function or a math function?).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that makes sense to do! Was thinking of a follow up PR to update some of the functions content as well as add to index.rst since this PR is already pretty big

| ["Amber","Dale","Hattie","Nanette"] |
+-------------------------------------+
* aggregation: mandatory. An aggregation function.
* bucket_nullable: optional. Controls whether the stats command includes null buckets in group-by aggregations. When set to ``false``, the aggregation ignores records where the group-by field is null, resulting in faster performance by excluding null bucket. **Default:** determined by ``plugins.ppl.syntax.legacy.preferred``:
Copy link
Member

@LantaoJin LantaoJin Oct 30, 2025

Choose a reason for hiding this comment

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

@ritvibhatt can you review your preview pages. It seems introduce many unexpected formatting.
For example, lines of bucket_nullable and span-expression in your preview
https://github.com/ritvibhatt/sql/blob/update-docs/docs/user/ppl/cmd/stats.rst are bold.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @LantaoJin, just rechecked previews for all of the files and fixed all of the nested bullet points to be formatted properly thanks!

Copy link
Member

Choose a reason for hiding this comment

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

@ritvibhatt the issue I mentioned above is still existing: the whole line of bucket_nullable is bold

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, I was missing a commit the issue should be fixed now. Have double checked the preview

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 2 weeks with no activity.

Signed-off-by: Ritvi Bhatt <[email protected]>
Signed-off-by: Ritvi Bhatt <[email protected]>
Signed-off-by: Ritvi Bhatt <[email protected]>
Signed-off-by: Ritvi Bhatt <[email protected]>
Signed-off-by: Ritvi Bhatt <[email protected]>
Signed-off-by: Ritvi Bhatt <[email protected]>
Signed-off-by: Ritvi Bhatt <[email protected]>
Swiddis
Swiddis previously approved these changes Nov 18, 2025
Signed-off-by: Ritvi Bhatt <[email protected]>
@LantaoJin
Copy link
Member

can u help to fix the typo in https://github.com/ritvibhatt/sql/blob/update-docs/docs/user/ppl/functions/condition.rst#regexp-match

Usage: regex_match(string, pattern) returns ..

change to

Usage: regexp_match(string, pattern) returns ...

Signed-off-by: Ritvi Bhatt <[email protected]>
@ritvibhatt
Copy link
Contributor Author

can u help to fix the typo in ritvibhatt/sql@update-docs/docs/user/ppl/functions/condition.rst#regexp-match

Usage: regex_match(string, pattern) returns ..

change to

Usage: regexp_match(string, pattern) returns ...

@LantaoJin Updated to be regexp_match!

Copy link
Member

@LantaoJin LantaoJin left a comment

Choose a reason for hiding this comment

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

LGTM, will keep eyes on CI.

@LantaoJin LantaoJin merged commit bf37067 into opensearch-project:main Nov 19, 2025
35 checks passed
asifabashar pushed a commit to asifabashar/sql that referenced this pull request Dec 10, 2025
* remove version info

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix defaults

Signed-off-by: Ritvi Bhatt <[email protected]>

* update main docs and move aggregate functions

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix format

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix heading underlines

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix typos/content

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix formatting

Signed-off-by: Ritvi Bhatt <[email protected]>

* update rex limitations

Signed-off-by: Ritvi Bhatt <[email protected]>

* update underlines and bullet points

Signed-off-by: Ritvi Bhatt <[email protected]>

* update function files

Signed-off-by: Ritvi Bhatt <[email protected]>

* update index.rst with commands table

Signed-off-by: Ritvi Bhatt <[email protected]>

* update formatting

Signed-off-by: Ritvi Bhatt <[email protected]>

* update wording

Signed-off-by: Ritvi Bhatt <[email protected]>

* move syntax

Signed-off-by: Ritvi Bhatt <[email protected]>

* update note

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix append docs

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix subbullet formatting

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix subbullet formatting

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix bullet points

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix bin format

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix bullet points

Signed-off-by: Ritvi Bhatt <[email protected]>

* update index.rst

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix stats

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix type in regexp_match

Signed-off-by: Ritvi Bhatt <[email protected]>

---------

Signed-off-by: Ritvi Bhatt <[email protected]>
Signed-off-by: ritvibhatt <[email protected]>
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 v3.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants