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

Fix default doc values to be enabled when a field is not indexed. #16141

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@jpountz
Copy link
Contributor

commented Jan 21, 2016

Doc values currently default to true if the field is indexed and not analyzed.
So setting index:no automatically disables doc values, which is not explicit
in the documentation.

This commit makes doc values default to true for numerics, booleans regardless
of whether they are indexed. Not indexed strings still don't have doc values,
since we can't know whether it is rather a text or keyword field. This
potential source of confusion should go away when we split string into text
and keyword.

Fix default doc values to be enabled when a field is not indexed.
Doc values currently default to `true` if the field is indexed and not analyzed.
So setting `index:no` automatically disables doc values, which is not explicit
in the documentation.

This commit makes doc values default to true for numerics, booleans regardless
of whether they are indexed. Not indexed strings still don't have doc values,
since we can't know whether it is rather a text or keyword field. This
potential source of confusion should go away when we split `string` into `text`
and `keyword`.
@@ -31,6 +31,7 @@
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.index.analysis.NamedAnalyzer;
import org.elasticsearch.index.fielddata.FieldDataType;

This comment has been minimized.

Copy link
@rjernst

rjernst Jan 21, 2016

Member

unused import?

@rjernst

This comment has been minimized.

Copy link
Member

commented Jan 21, 2016

LGTM

@jpountz

This comment has been minimized.

Copy link
Contributor Author

commented Jan 27, 2016

Closed via f959d39

@jpountz jpountz closed this Jan 27, 2016

@jpountz jpountz deleted the jpountz:fix/default_doc_values branch Jan 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.