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

MetaData#concreteIndices to throw exception with a single index argument if allowNoIndices == false #6137

Closed

Conversation

javanna
Copy link
Member

@javanna javanna commented May 12, 2014

Fixed MetaData#concreteIndices to throw exception with a single index argument in case allowNoIndices == false and ignoreUnavailable == true.

The current behaviour is inconsistent as 2 or more non existing indices would cause an exception to be thrown:

GET /a,b/_search?allow_no_indices=false&ignore_unavailable=true

{
   "error": "IndexMissingException[[[a, b]] missing]",
   "status": 404
}

On the other hand

GET /a/_search?allow_no_indices=false&ignore_unavailable=true

returns 0 results and no exception regardless of the allow_no_indices value.

Took also the chance to improve the javadocs for IndicesOptions class.

… argument in case allowNoIndices == false and ignoreUnavailable == true

Closes elastic#6137
@javanna javanna self-assigned this May 12, 2014
*/
public boolean expandWildcardsOpen() {
return (id & 4) != 0;
}

/**
* @return Whether wildcard indices expressions should expanded into closed indices should be
* @return Whether wildcard expressions should get expanded ato closed indices
Copy link
Contributor

Choose a reason for hiding this comment

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

s/ato/to/

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks for catching this :)

@jpountz
Copy link
Contributor

jpountz commented May 12, 2014

LGTM

javanna added a commit that referenced this pull request May 12, 2014
… argument in case allowNoIndices == false and ignoreUnavailable == true

Closes #6137
@javanna javanna closed this in c69c66b May 12, 2014
@s1monw s1monw removed the review label Jun 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants