Skip to content

add missing test2 index in alias example #39212

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

Merged
merged 3 commits into from
Feb 21, 2019
Merged

add missing test2 index in alias example #39212

merged 3 commits into from
Feb 21, 2019

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Feb 20, 2019

from original PR:

If I got the idea of aliases properly, I think that the index "test2" should have a reference in the
example above of the following sentence:

" ... we associate the alias alias1 to both test and test2 ... "

this PR re-applies #39055. That PR was prematurely merged with a failing test.

githubfromgui and others added 2 commits February 20, 2019 15:16
If I got the idea of aliases properly, I think that the index "test2" should have a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "
@talevy talevy added >docs General docs changes :Data Management/Indices APIs APIs to create and manage indices and templates labels Feb 20, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

}
]
}
--------------------------------------------------
// CONSOLE
// TEST[s/^/PUT test\n/]
// TEST[s/^/PUT test\nPUT test2\n/]

In this example, we associate the alias `alias1` to both `test` and `test2`, where
Copy link
Contributor

Choose a reason for hiding this comment

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

Reading the rest of this example, I think the final section may be incorrect as well:

To swap which index is the write index for an alias, the Aliases API can be leveraged to
do an atomic swap. The swap is not dependent on the ordering of the actions.

POST /_aliases
{
    "actions" : [
        {
            "add" : {
                 "index" : "test",
                 "alias" : "alias1",
                 "is_write_index" : true
            }
        }, {
            "add" : {
                 "index" : "test2",
                 "alias" : "alias1",
                 "is_write_index" : false
            }
        }
    ]
}

Given the description, it seems like the boolean values for is_write_index should be flipped. I think it'd be nice to fix that in this PR as well, if you also think that's reasonable?

Copy link
Contributor Author

@talevy talevy Feb 21, 2019

Choose a reason for hiding this comment

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

ah, I see. I think, when writing the docs, this was meant to be thought of as a separate example. Now I see that it feels like a continuation of the previous

swap which is write/read
@talevy
Copy link
Contributor Author

talevy commented Feb 21, 2019

thanks Julie, updated!

Copy link
Contributor

@jtibshirani jtibshirani 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 to me!

@talevy
Copy link
Contributor Author

talevy commented Feb 21, 2019

thanks!

@talevy talevy merged commit 3ac77ae into elastic:master Feb 21, 2019
@talevy talevy deleted the fxdc branch February 21, 2019 00:27
talevy added a commit to talevy/elasticsearch that referenced this pull request Feb 21, 2019
* missing 'test2' index example (elastic#39055)

If I got the idea of aliases properly, I think that the index "test2" should have a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read
talevy added a commit to talevy/elasticsearch that referenced this pull request Feb 21, 2019
* missing 'test2' index example (elastic#39055)

If I got the idea of aliases properly, I think that the index "test2" should have a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read
talevy added a commit to talevy/elasticsearch that referenced this pull request Feb 21, 2019
* missing 'test2' index example (elastic#39055)

If I got the idea of aliases properly, I think that the index "test2" should have a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read
talevy added a commit to talevy/elasticsearch that referenced this pull request Feb 21, 2019
* missing 'test2' index example (elastic#39055)

If I got the idea of aliases properly, I think that the index "test2" should have a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read
talevy added a commit that referenced this pull request Feb 21, 2019
* missing 'test2' index example (#39055)

If I got the idea of aliases properly, I think that the index "test2" should have
a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read

Co-authored-by: Guilherme Ferreira <[email protected]>
talevy added a commit that referenced this pull request Feb 21, 2019
* missing 'test2' index example (#39055)

If I got the idea of aliases properly, I think that the index "test2" should have a 
reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read

Co-authored-by: Guilherme Ferreira <[email protected]>
talevy added a commit that referenced this pull request Feb 21, 2019
* missing 'test2' index example (#39055)

If I got the idea of aliases properly, I think that the index "test2" should have 
a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read

Co-authored-by: Guilherme Ferreira <[email protected]>
talevy added a commit that referenced this pull request Feb 21, 2019
* missing 'test2' index example (#39055)

If I got the idea of aliases properly, I think that the index "test2" should have 
a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read

Co-authored-by: Guilherme Ferreira <[email protected]>
weizijun pushed a commit to weizijun/elasticsearch that referenced this pull request Feb 22, 2019
* missing 'test2' index example (elastic#39055)

If I got the idea of aliases properly, I think that the index "test2" should have a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read
weizijun pushed a commit to weizijun/elasticsearch that referenced this pull request Feb 22, 2019
* missing 'test2' index example (elastic#39055)

If I got the idea of aliases properly, I think that the index "test2" should have a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read
@jakelandis jakelandis removed the v8.0.0 label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >docs General docs changes v6.6.2 v6.7.0 v7.0.0-rc1 v7.2.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants