mirror of https://github.com/apache/lucene.git
Merged revision(s) 1672518 from lucene/dev/branches/branch_5x:
SOLR-7164: update lucene field also ........ git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1672532 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5934ea0901
commit
6bed01b2ae
|
@ -139,6 +139,8 @@ public class BBoxField extends AbstractSpatialFieldType<BBoxStrategy> implements
|
|||
final SchemaField solrNumField = new SchemaField("_", numberType);//dummy temp
|
||||
org.apache.lucene.document.FieldType luceneType =
|
||||
(org.apache.lucene.document.FieldType) solrNumField.createField(0.0, 1.0f).fieldType();
|
||||
luceneType.setStored(storeSubFields);
|
||||
|
||||
//and annoyingly this Field isn't going to have a docValues format because Solr uses a separate Field for that
|
||||
if (solrNumField.hasDocValues()) {
|
||||
luceneType = new org.apache.lucene.document.FieldType(luceneType);
|
||||
|
|
|
@ -382,6 +382,11 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
|
|||
// Make sure the subfields are not stored
|
||||
SchemaField sub = schema.getField("bbox"+BBoxStrategy.SUFFIX_MINX);
|
||||
assertFalse(sub.stored());
|
||||
|
||||
// Make sure solr field type is also not stored
|
||||
BBoxField bbox = (BBoxField)schema.getField("bbox").getType();
|
||||
BBoxStrategy strategy = bbox.getStrategy("bbox");
|
||||
assertFalse(strategy.getFieldType().stored());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue