mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Internal: use 1 instead of 0 as filler version value for nested docs
This commit is contained in:
parent
4723c2a2ee
commit
5d53d03c2d
@ -131,11 +131,11 @@ public class VersionFieldMapper extends AbstractFieldMapper<Long> implements Int
|
||||
|
||||
@Override
|
||||
public void postParse(ParseContext context) throws IOException {
|
||||
// In the case of nested docs, let's fill nested docs with version=0 so that Lucene doesn't write a Bitset for documents
|
||||
// that don't have the field
|
||||
// In the case of nested docs, let's fill nested docs with version=1 so that Lucene doesn't write a Bitset for documents
|
||||
// that don't have the field. This is consistent with the default value for efficiency.
|
||||
for (int i = 1; i < context.docs().size(); i++) {
|
||||
final Document doc = context.docs().get(i);
|
||||
doc.add(new NumericDocValuesField(NAME, 0L));
|
||||
doc.add(new NumericDocValuesField(NAME, 1L));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user