LUCENE-7734: FieldType copy constructor widened to IndexableFieldType

This commit is contained in:
David Smiley 2017-03-09 23:12:45 -05:00
parent d945a246f6
commit d2bf30d58f
2 changed files with 6 additions and 3 deletions

View File

@ -117,6 +117,9 @@ API Changes
instead of once all shard responses are present. (Simon Willnauer, instead of once all shard responses are present. (Simon Willnauer,
Mike McCandless) Mike McCandless)
* LUCENE-7734: FieldType's copy constructor was widened to accept any IndexableFieldType.
(David Smiley)
New Features New Features
* LUCENE-7449: Add CROSSES relation support to RangeFieldQuery. (Nick Knize) * LUCENE-7449: Add CROSSES relation support to RangeFieldQuery. (Nick Knize)

View File

@ -44,7 +44,7 @@ public class FieldType implements IndexableFieldType {
/** /**
* Create a new mutable FieldType with all of the properties from <code>ref</code> * Create a new mutable FieldType with all of the properties from <code>ref</code>
*/ */
public FieldType(FieldType ref) { public FieldType(IndexableFieldType ref) {
this.stored = ref.stored(); this.stored = ref.stored();
this.tokenized = ref.tokenized(); this.tokenized = ref.tokenized();
this.storeTermVectors = ref.storeTermVectors(); this.storeTermVectors = ref.storeTermVectors();
@ -54,8 +54,8 @@ public class FieldType implements IndexableFieldType {
this.omitNorms = ref.omitNorms(); this.omitNorms = ref.omitNorms();
this.indexOptions = ref.indexOptions(); this.indexOptions = ref.indexOptions();
this.docValuesType = ref.docValuesType(); this.docValuesType = ref.docValuesType();
this.dimensionCount = ref.dimensionCount; this.dimensionCount = ref.pointDimensionCount();
this.dimensionNumBytes = ref.dimensionNumBytes; this.dimensionNumBytes = ref.pointNumBytes();
// Do not copy frozen! // Do not copy frozen!
} }