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

[CCI] Create advanced index actions guide #363

Conversation

Nicksqain
Copy link
Contributor

@Nicksqain Nicksqain commented Apr 8, 2023

Description

  • Create advanced index actions guide

Issues Resolved

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.

@Nicksqain Nicksqain changed the title Create advanced index actions guide [CCI] Create advanced index actions guide Apr 8, 2023
@harshavamsi
Copy link
Collaborator

@Nicksqain can you add a change in the CHANGELOG file?

@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2023

Codecov Report

Merging #363 (2e0a08d) into main (c8b04a5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #363   +/-   ##
=======================================
  Coverage   70.92%   70.92%           
=======================================
  Files          81       81           
  Lines        7732     7732           
=======================================
  Hits         5484     5484           
  Misses       2248     2248           

@Nicksqain
Copy link
Contributor Author

@harshavamsi Could you suggest which section and version?

@Nicksqain can you add a change in the CHANGELOG file?

Signed-off-by: Alexei Karikov <[email protected]>
@saimedhi
Copy link
Collaborator

saimedhi commented Jun 5, 2023

@harshavamsi Could you suggest which section and version?

@Nicksqain can you add a change in the CHANGELOG file?

@Nicksqain, please add changelog to unreleased - added section. And also merge all the commits into single commit.

@saimedhi
Copy link
Collaborator

saimedhi commented Jun 5, 2023

Code tested and Its working.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

We've made some improvements to the users guide since this.

  1. Resolve conflicts.
  2. Link from users guide.
  3. Add a working sample.

Let's finish this!

@Nicksqain
Copy link
Contributor Author

@dblock Yes, I'll be sure to add the necessary changes on a free day!

@saimedhi
Copy link
Collaborator

@Nicksqain, Could you please make the requested changes when you have a moment? Thank you!

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Looks good, let's fix capitalization?

We've also started adding working samples that are mentioned in guides to avoid copy-paste errors. Consider writing the code that's described in this guide in https://github.com/opensearch-project/opensearch-py/tree/main/samples?

USER_GUIDE.md Outdated
@@ -153,6 +153,7 @@ print(response)
- [Search](guides/search.md)
- [Point in Time](guides/point_in_time.md)
- [Using a Proxy](guides/proxy.md)
- [Advanced index actions](guides/advanced_index_actions.md)
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize Index Actions

guides/advanced_index_actions.md Show resolved Hide resolved

## API Actions

### Clear index cache
Copy link
Member

Choose a reason for hiding this comment

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

Do other guides capitalize Clear Index Cache?

Signed-off-by: Alexei Karikov <[email protected]>
@Nicksqain Nicksqain requested a review from dblock September 5, 2023 15:14
Signed-off-by: Alexei Karikov <[email protected]>
- [Open/Close Index](#open-close-index)
- [Force merge index](#force-merge-index)
- [Clone index](#clone-index)
- [Split index](#split-index)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Capitalize Split index, Clone index, Force merge index

@Nicksqain Nicksqain requested a review from saimedhi September 5, 2023 17:19
client.indices.open(index='movies')
```

### Force merge index
Copy link
Member

Choose a reason for hiding this comment

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

One more.

@saimedhi
Copy link
Collaborator

saimedhi commented Sep 5, 2023

@Nicksqain, Thanks for your contribution. Please add a working sample if possible.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Will you write a sample as part of this PR?

guides/advanced_index_actions.md Outdated Show resolved Hide resolved
@Nicksqain
Copy link
Contributor Author

@dblock
I don't really understand how to do it, I've already forgotten everything.
I don't have a lot of time right now. So, thought I'd contribute in my spare time. Could you pass it on to a more competent applicant?

@Nicksqain Nicksqain requested a review from dblock September 5, 2023 17:36
@dblock
Copy link
Member

dblock commented Sep 6, 2023

We can merge the guide, thanks for your help.

@dblock
Copy link
Member

dblock commented Sep 6, 2023

@saimedhi you're good with this?

Copy link
Collaborator

@saimedhi saimedhi left a comment

Choose a reason for hiding this comment

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

@Nicksqain, Thank you for contributing :) Could you kindly make those two small changes mentioned below?

I tested the code its working fine. And we can merge this PR after those 2 small changes. Thanks!

- [Clear Index Cache](#clear-index-cache)
- [Flush Index](#flush-index)
- [Refresh Index](#refresh-index)
- [Open/Close Index](#open-close-index)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This link is not working.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dblock This guide has broken linking because of the use of [Open/Close Index](#open-close-index) syntax. I think the / character is breaking the #open-close-index link, but not sure. Regardless, I need to change the section title to use a Open or close index & make the hash link #open-or-close-index.(or something similar)

  • This isn't an issue in the Ruby guide version because those guides don't include the MD hash linking at the top of the guide

Is the section title I suggested okay to you? Or would you prefer some other title/hash-link?

Copy link
Member

Choose a reason for hiding this comment

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

Perfectly fine!

client.indices.clear_cache(index='movies')
```

By default, the `indices.clear_cache` API action clears all types of cache. To clear specific types of cache pass the the `query`, `fielddata`, or `request` parameter to the API action:
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove one "the" after cache pass.

@saimedhi
Copy link
Collaborator

@Nicksqain, kindly make the above changes and lets merge this :)

@saimedhi
Copy link
Collaborator

@Nicksqain, kindly make the above changes and lets merge this :)

@saimedhi
Copy link
Collaborator

@Nicksqain, kindly make the above changes and resolve merge conflicts. Thanks :)

@Djcarrillo6
Copy link
Contributor

Hi @saimedhi I see on 9/5/2023 Nicksquain requested that another contributor take over the PR to complete the requested changes. I believe I can complete the requested changes & add a sample guide as was originally requested. Would it be ok with you to take over the resolution of issue #350?

@dblock
Copy link
Member

dblock commented Oct 13, 2023

@Djcarrillo6 please do it!

@Djcarrillo6
Copy link
Contributor

@dblock ok great I'm on it!

@Djcarrillo6
Copy link
Contributor

Djcarrillo6 commented Oct 13, 2023

@dblock @saimedhi I opened a new PR that when approved & merged, will allow for the closure of this PR.

@saimedhi
Copy link
Collaborator

@Djcarrillo6, please consider committing small fixes to the Nicksqain:advanced-index-actions-py-guide branch instead of creating new PR.

If needed, create a separate PR for sample.

Thank you.

@Djcarrillo6
Copy link
Contributor

@saimedhi I opened a PR with my fixes/additions for this issue into @Nicksqain's open PR(this one) however I'm realizing now that he would have to accept it for those changes to be merged into this PR. Unless I'm mistaken, I don't think I can get my commit directly to his Nicksqain:advanced-index-actions-py-guide branch. Is there another way to get my branch into "Nicksqain:advanced-index-actions-py-guide"?

@saimedhi
Copy link
Collaborator

@saimedhi I opened a PR with my fixes/additions for this issue into @Nicksqain's open PR(this one) however I'm realizing now that he would have to accept it for those changes to be merged into this PR. Unless I'm mistaken, I don't think I can get my commit directly to his Nicksqain:advanced-index-actions-py-guide branch. Is there another way to get my branch into "Nicksqain:advanced-index-actions-py-guide"?

I am sorry, you are right. please reopen your PR with all the changes.

@Djcarrillo6
Copy link
Contributor

@saimedhi I opened a PR with my fixes/additions for this issue into @Nicksqain's open PR(this one) however I'm realizing now that he would have to accept it for those changes to be merged into this PR. Unless I'm mistaken, I don't think I can get my commit directly to his Nicksqain:advanced-index-actions-py-guide branch. Is there another way to get my branch into "Nicksqain:advanced-index-actions-py-guide"?

I am sorry, you are right. please reopen your PR with all the changes.

No worries! It will be opened shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Guide] Advanced Index Actions
6 participants