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

Make the index property a boolean. #16161

Closed

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Jan 21, 2016

With the split of string into text and keyword, the index property can
only have two values and should be a boolean.

With the split of `string` into `text` and `keyword`, the `index` property can
only have two values and should be a boolean.
@jpountz jpountz added >enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types v5.0.0-alpha1 labels Jan 21, 2016
@rjernst
Copy link
Member

rjernst commented Jan 21, 2016

Looks good. Maybe add a backcompat test for the old ways that were supported, and see it still works with created version before 3.0?

}
/* Only protected so that string can override it */
protected Object indexTokenizeOption(boolean indexed, boolean tokenized) {
return Boolean.valueOf(indexed);
Copy link
Member

Choose a reason for hiding this comment

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

Boxing of primitive booleans always leads to the same references as this is guaranteed by the JLS so the explicit call to Boolean#valueOf is not needed (however the OpenJDK implementation of the boxing conversion here is to just insert a call to Boolean#valueOf but that's just an implementation detail).

If the value p being boxed is true, false, [...], then let r1 and r2 be the results of any two boxing conversions of p. It is always the case that r1 == r2.

@jpountz
Copy link
Contributor Author

jpountz commented Jan 22, 2016

@rjernst @jasontedor Thanks for the reviews, I pushed a new commit.

@jasontedor
Copy link
Member

LGTM.

@jpountz
Copy link
Contributor Author

jpountz commented Jan 27, 2016

Fixed via 2098608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants