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

[Styling] Indexes vs Indices #8696

Open
nhtruong opened this issue Nov 7, 2024 · 5 comments
Open

[Styling] Indexes vs Indices #8696

nhtruong opened this issue Nov 7, 2024 · 5 comments
Assignees
Labels
1 - Backlog - DEV Developer assigned to issue is responsible for creating PR. discuss

Comments

@nhtruong
Copy link
Contributor

nhtruong commented Nov 7, 2024

We currently have a style rule that says Use 'indexes' instead of 'indices'. However, the OpenSearch cluster and clients refer to the plural of index as indices instead of indexes:

  • We have a namespace called indices that all clients use. Eg client.indices.delete()
  • indices is used in OpenSearch cluster code 2900 times while indexes is used much more sporadically with 139 usages.
  • On the spec, indices is also used as fields for request and response bodies. While indexes is only used in descriptions.

I believe we should have the opposite rule instead: Replace indexes with indices.

@Naarcha-AWS
Copy link
Collaborator

Naarcha-AWS commented Nov 19, 2024

Considering the amount indices is used in code, I'm generally for this.

@natebower, @kolchfa-aws, @vagimeli: What are your thoughts?

@Naarcha-AWS Naarcha-AWS added 1 - Backlog - DEV Developer assigned to issue is responsible for creating PR. discuss labels Nov 19, 2024
@kolchfa-aws
Copy link
Collaborator

I was always for keeping indices.

@kolchfa-aws
Copy link
Collaborator

Regarding the Vale rule, it stems from our terms list:

index, indexes

In technical documentation and the UI, use indexes as the plural form of index. Use indices only in the context of mathematical expressions. Variable and setting names should not be changed.

In blog posts, use the plural indexes unless there is a domain-specific reason (for example, a mathematical or financial context) to use indices.

@natebower
Copy link
Collaborator

natebower commented Nov 25, 2024

I don't have a personal opinion, but for context, our style guide prescribes the use of indexes because it appears to be industry standard:

  • Microsoft: Use indexes as the plural form of index. Use indices only in the context of mathematical expressions.

  • Google: Use the plural indexes unless there is a domain-specific reason (for example, a mathematical or financial context) to use indices.

  • AWS: Use indexes as the plural form of index. Use indices only in context of mathematical expressions.

@natebower
Copy link
Collaborator

Notwithstanding the context above, I will leave it up to you all. If we feel that indices is more appropriate to our use case, I'm fine with that and have no problem changing the style guide, but I would expect for the change to be applied across the docs site 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Backlog - DEV Developer assigned to issue is responsible for creating PR. discuss
Projects
None yet
Development

No branches or pull requests

4 participants