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: create table fulltext column options #1053

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

zhongzc
Copy link
Contributor

@zhongzc zhongzc commented Jul 11, 2024

What's Changed in this PR

Describe the change in this PR

Checklist

  • Please confirm that all corresponding versions of the documents have been revised.
  • Please ensure that the content in summary.yml matches the current document structure when you changed the document structure.
  • This change requires follow-up update in localized docs.

Summary by CodeRabbit

  • New Features

    • Enhanced CREATE TABLE syntax with FULLTEXT column options for full-text indexing.
    • Introduced FULLTEXT WITH options for specifying analyzer language and case sensitivity in full-text indexes.
  • Documentation

    • Updated SQL CREATE TABLE documentation to reflect new full-text indexing capabilities.
    • Provided detailed examples and usage for creating tables with full-text indexes and specific options.

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
@zhongzc zhongzc requested review from nicecui and a team as code owners July 11, 2024 19:16
Copy link
Contributor

coderabbitai bot commented Jul 11, 2024

Walkthrough

The recent updates to the SQL CREATE TABLE syntax now include enhanced full-text indexing capabilities. A new FULLTEXT option and FULLTEXT WITH configurations allow specifying options such as analyzer language and case sensitivity. These changes provide greater flexibility and functionality for creating full-text indexes on string columns, optimizing search operations.

Changes

File Change Summary
docs/nightly/zh/reference/... Modified CREATE TABLE syntax to include FULLTEXT and FULLTEXT WITH options for full-text indexing
docs/nightly/en/reference/... Updated CREATE TABLE syntax to include FULLTEXT and FULLTEXT WITH options for full-text indexing

Poem

In tables where data does bloom,
Full-text searches dispel the gloom.
With analyzers set just right,
Case-sensitivity takes flight.
Now queries soar,
As indexes explore,
In databases, a new light! 🌟🗃️


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bbe2608 and 36d0389.

Files selected for processing (1)
  • docs/nightly/zh/reference/sql/create.md (3 hunks)
Additional comments not posted (4)
docs/nightly/zh/reference/sql/create.md (4)

57-58: Approved: Updated syntax for CREATE TABLE.

The addition of FULLTEXT and FULLTEXT WITH options to the CREATE TABLE syntax is clear and consistent.


165-165: Approved: Addition of FULLTEXT column option.

The description of the FULLTEXT column option is clear and correctly placed in the column options table.


205-230: Approved: New section for FULLTEXT column option.

The new section provides a clear and detailed explanation of the FULLTEXT column option, including usage examples and default values. This addition enhances the documentation by providing comprehensive information about the new feature.


Line range hint 1-56:
Approved: Overall document consistency.

The rest of the document maintains consistency and provides clear context and examples for various CREATE statements.

Also applies to: 59-164, 166-204, 231-360

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
docs/nightly/en/reference/sql/create.md (1)

200-225: Detailed Documentation for FULLTEXT Column Option

The new section provides a comprehensive explanation of the FULLTEXT column option, including its usage, configurations, and examples. This addition is clear and well-documented.

Language Improvement

Correct the punctuation in the list items for better readability.

- The `FULLTEXT` option is used to create a full-text index, accelerating full-text search operations. This option can only be applied to string-type columns.
- You can specify the following options using `FULLTEXT WITH`:
- `analyzer`: Sets the language analyzer for the full-text index. Supported values are `English` and `Chinese`.
- `case_sensitive`: Determines whether the full-text index is case-sensitive. Supported values are `true` and `false`.

- If `WITH` is not specified, `FULLTEXT` will use the following default values:
- `analyzer`: default is `English`
- `case_sensitive`: default is `true`
+ The `FULLTEXT` option is used to create a full-text index, accelerating full-text search operations. This option can only be applied to string-type columns.
+ 
+ You can specify the following options using `FULLTEXT WITH`:
+ - `analyzer`: Sets the language analyzer for the full-text index. Supported values are `English` and `Chinese`.
+ - `case_sensitive`: Determines whether the full-text index is case-sensitive. Supported values are `true` and `false`.
+ 
+ If `WITH` is not specified, `FULLTEXT` will use the following default values:
+ - `analyzer`: default is `English`
+ - `case_sensitive`: default is `true`
Tools
LanguageTool

[uncategorized] ~206-~206: Loose punctuation mark.
Context: ...ons using FULLTEXT WITH: - analyzer: Sets the language analyzer for the full...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~207-~207: Loose punctuation mark.
Context: ...glishandChinese. - case_sensitive`: Determines whether the full-text index ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~211-~211: Loose punctuation mark.
Context: ... following default values: - analyzer: default is English - case_sensitive...

(UNLIKELY_OPENING_PUNCTUATION)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 36d0389 and dcf213b.

Files selected for processing (1)
  • docs/nightly/en/reference/sql/create.md (3 hunks)
Additional context used
LanguageTool
docs/nightly/en/reference/sql/create.md

[uncategorized] ~206-~206: Loose punctuation mark.
Context: ...ons using FULLTEXT WITH: - analyzer: Sets the language analyzer for the full...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~207-~207: Loose punctuation mark.
Context: ...glishandChinese. - case_sensitive`: Determines whether the full-text index ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~211-~211: Loose punctuation mark.
Context: ... following default values: - analyzer: default is English - case_sensitive...

(UNLIKELY_OPENING_PUNCTUATION)

Additional comments not posted (4)
docs/nightly/en/reference/sql/create.md (4)

56-57: Syntax Update for CREATE TABLE

The CREATE TABLE syntax now includes FULLTEXT and FULLTEXT WITH options for column definitions. This is correctly integrated and documented.


162-162: Column Option Addition

The FULLTEXT option is correctly added to the column options table, indicating it creates a full-text index for string-type columns.


214-222: Example for FULLTEXT Column Option

The example for creating a table with a full-text index is clear and demonstrates the use of the FULLTEXT WITH option effectively.


224-224: Reference to Additional Documentation

The reference to the Log Query Documentation for more information on full-text indexing and search is appropriate and relevant.

Copy link
Collaborator

@nicecui nicecui left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@killme2008 killme2008 merged commit f263b93 into GreptimeTeam:main Jul 15, 2024
3 checks passed
killme2008 pushed a commit that referenced this pull request Jul 22, 2024
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Co-authored-by: Yiran <cuiyiran3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants