Skip to content

Remove "uninverted" and "binary" fielddata support for numeric and boolean fields. #14082

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 1 commit into from
Oct 21, 2015

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Oct 13, 2015

Numeric and boolean fields have doc values enabled by default as of
elasticsearch 2.0. This commit removes support for uninverted/in-memory
fielddata, as well as numeric fields encoded in binary doc values which was
the way that elasticsearch stored doc values in a Lucene index before the
1.4 release.

As a consequence, you will only be able to sort and aggregate on numeric and
boolean fields in Elasticsearch 3.0 if doc values have not been switched off.

Relates #14113

private static final IndexFieldData.Builder MISSING_DOC_VALUES_BUILDER = new IndexFieldData.Builder() {
@Override
public IndexFieldData<?> build(Index index, Settings indexSettings, MappedFieldType fieldType, IndexFieldDataCache cache, CircuitBreakerService breakerService, MapperService mapperService) {
throw new IllegalStateException("Fielddata can't be loaded on field [" + fieldType.names().fullName()
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure what this message means - maybe better to say that fielddata is unsupported for these types and to use docvalues instead?

@jpountz
Copy link
Contributor Author

jpountz commented Oct 19, 2015

@nik9000 I pushed a new commit.

@@ -238,4 +188,67 @@ public void onRemoval(ShardId shardId, MappedFieldType.Names fieldNames, FieldDa
}
}


public void testRequireDocValuesOnLongs() {
ThreadPool threadPool = new ThreadPool("random_threadpool_name");
Copy link
Member

Choose a reason for hiding this comment

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

These seem copy-and-paste-ish. Can you make a method that does the assertion and just call it for all the types? Or do it in a for loop or something?

@nik9000
Copy link
Member

nik9000 commented Oct 19, 2015

Left a minor comment - it looks pretty good to me otherwise. Its nice to see this code go.

…olean fields.

Numeric and boolean fields have doc values enabled by default as of
elasticsearch 2.0. This commit removes support for uninverted/in-memory
fielddata, as well as numeric fields encoded in binary doc values which was
the way that elasticsearch stored doc values in a Lucene index before the
1.4 release.

As a consequence, you will only be able to sort and aggregate on numeric and
boolean fields in Elasticsearch 3.0 if doc values have not been switched off.
@jpountz jpountz force-pushed the remove/uninverted_numeric_fielddata branch from 8557bb8 to 76231c8 Compare October 21, 2015 10:55
jpountz added a commit that referenced this pull request Oct 21, 2015
…ddata

Remove "uninverted" and "binary" fielddata support for numeric and boolean fields.
@jpountz jpountz merged commit f4e9f69 into elastic:master Oct 21, 2015
@jpountz jpountz deleted the remove/uninverted_numeric_fielddata branch October 21, 2015 11:03
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Fielddata labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking :Search/Search Search-related issues that do not fall into other categories v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants