Search in sources :

Example 1 with BBoxField

use of org.apache.solr.schema.BBoxField in project lucene-solr by apache.

the class TestSolr4Spatial method testSpatialConfig.

@Test
public void testSpatialConfig() throws Exception {
    try (SolrCore core = h.getCoreInc()) {
        IndexSchema schema = core.getLatestSchema();
        // BBox Config
        // 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());
    }
}
Also used : SchemaField(org.apache.solr.schema.SchemaField) BBoxStrategy(org.apache.solr.legacy.BBoxStrategy) SolrCore(org.apache.solr.core.SolrCore) BBoxField(org.apache.solr.schema.BBoxField) IndexSchema(org.apache.solr.schema.IndexSchema) Test(org.junit.Test)

Aggregations

SolrCore (org.apache.solr.core.SolrCore)1 BBoxStrategy (org.apache.solr.legacy.BBoxStrategy)1 BBoxField (org.apache.solr.schema.BBoxField)1 IndexSchema (org.apache.solr.schema.IndexSchema)1 SchemaField (org.apache.solr.schema.SchemaField)1 Test (org.junit.Test)1