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

Add --try flag to ongr:es:index:create command #423

Closed
martiis opened this issue Sep 16, 2015 · 6 comments
Closed

Add --try flag to ongr:es:index:create command #423

martiis opened this issue Sep 16, 2015 · 6 comments
Assignees
Milestone

Comments

@martiis
Copy link
Contributor

martiis commented Sep 16, 2015

Then if index already exists exception should not be thrown, but a clear message outputed saying that index already exists or smth..

@kazysgurskas
Copy link
Contributor

+1

@saimaz saimaz added this to the 1.1.0 milestone Sep 23, 2015
@saimaz saimaz modified the milestones: 1.0.0, 1.1.0 Dec 31, 2015
@trandangtri trandangtri assigned ndinh215 and unassigned trandangtri Jan 5, 2016
@mvar
Copy link
Member

mvar commented Jan 5, 2016

Please give right name for this option. --try is misleading. As far as I understand the expected result is to create index or silently ignore exception if it is already created.

BTW, Doctrine has similar flag on database:create command. It's named --if-not-exists. Not sure about such name, but at least it's not misleading.

@ndinh215
Copy link
Contributor

ndinh215 commented Jan 5, 2016

Yes, this is also my concern. "--if-not-exists" is correct option in Doctrine. Here, we just show error message instead of exception in the case of existing a certain index.
"Try" does not reflect the meaning of purpose. We could use "--if-not-exists" or "--check-index-exists"
@saimaz @mvar how do you think?

@saimaz
Copy link
Member

saimaz commented Jan 5, 2016

Agree with @mvar --try doesn't say anything. --if-not-exists is more correct option name.

@ndinh215
Copy link
Contributor

ndinh215 commented Jan 5, 2016

I fixed it, please review the PR #535. Thanks.

@mvar
Copy link
Member

mvar commented Jan 8, 2016

From now on we have --if-not-exists flag to control if command should check for index existence or not.

@mvar mvar closed this as completed Jan 8, 2016
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

No branches or pull requests

6 participants