-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
Remove "uninverted" and "binary" fielddata support for numeric and boolean fields. #14082
Conversation
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() |
There was a problem hiding this comment.
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?
@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"); |
There was a problem hiding this comment.
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?
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.
8557bb8
to
76231c8
Compare
…ddata Remove "uninverted" and "binary" fielddata support for numeric and boolean 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.
Relates #14113