Search in sources :

Example 1 with AbstractAtomicGeoPointFieldData

use of org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData in project elasticsearch by elastic.

the class GeoFieldDataTests method testSingleValueAllSet.

@Override
public void testSingleValueAllSet() throws Exception {
    fillSingleValueAllSet();
    IndexFieldData indexFieldData = getForField("value");
    List<LeafReaderContext> readerContexts = refreshReader();
    for (LeafReaderContext readerContext : readerContexts) {
        AtomicFieldData fieldData = indexFieldData.load(readerContext);
        assertThat(fieldData.ramBytesUsed(), greaterThanOrEqualTo(minRamBytesUsed()));
        MultiGeoPointValues fieldValues = ((AbstractAtomicGeoPointFieldData) fieldData).getGeoPointValues();
        assertValues(fieldValues, 0);
        assertValues(fieldValues, 1);
        assertValues(fieldValues, 2);
    }
}
Also used : LeafReaderContext(org.apache.lucene.index.LeafReaderContext) AbstractAtomicGeoPointFieldData(org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData)

Example 2 with AbstractAtomicGeoPointFieldData

use of org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData in project elasticsearch by elastic.

the class GeoFieldDataTests method testSingleValueWithMissing.

@Override
public void testSingleValueWithMissing() throws Exception {
    fillSingleValueWithMissing();
    IndexFieldData indexFieldData = getForField("value");
    List<LeafReaderContext> readerContexts = refreshReader();
    for (LeafReaderContext readerContext : readerContexts) {
        AtomicFieldData fieldData = indexFieldData.load(readerContext);
        assertThat(fieldData.ramBytesUsed(), greaterThanOrEqualTo(minRamBytesUsed()));
        MultiGeoPointValues fieldValues = ((AbstractAtomicGeoPointFieldData) fieldData).getGeoPointValues();
        assertValues(fieldValues, 0);
        assertMissing(fieldValues, 1);
        assertValues(fieldValues, 2);
    }
}
Also used : LeafReaderContext(org.apache.lucene.index.LeafReaderContext) AbstractAtomicGeoPointFieldData(org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData)

Example 3 with AbstractAtomicGeoPointFieldData

use of org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData in project elasticsearch by elastic.

the class GeoFieldDataTests method testMultiValueAllSet.

@Override
public void testMultiValueAllSet() throws Exception {
    fillMultiValueAllSet();
    IndexFieldData indexFieldData = getForField("value");
    List<LeafReaderContext> readerContexts = refreshReader();
    for (LeafReaderContext readerContext : readerContexts) {
        AtomicFieldData fieldData = indexFieldData.load(readerContext);
        assertThat(fieldData.ramBytesUsed(), greaterThanOrEqualTo(minRamBytesUsed()));
        MultiGeoPointValues fieldValues = ((AbstractAtomicGeoPointFieldData) fieldData).getGeoPointValues();
        assertValues(fieldValues, 0);
        assertValues(fieldValues, 1);
        assertValues(fieldValues, 2);
    }
}
Also used : LeafReaderContext(org.apache.lucene.index.LeafReaderContext) AbstractAtomicGeoPointFieldData(org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData)

Example 4 with AbstractAtomicGeoPointFieldData

use of org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData in project elasticsearch by elastic.

the class GeoFieldDataTests method testMultiValueWithMissing.

@Override
public void testMultiValueWithMissing() throws Exception {
    fillMultiValueWithMissing();
    IndexFieldData indexFieldData = getForField("value");
    List<LeafReaderContext> readerContexts = refreshReader();
    for (LeafReaderContext readerContext : readerContexts) {
        AtomicFieldData fieldData = indexFieldData.load(readerContext);
        assertThat(fieldData.ramBytesUsed(), greaterThanOrEqualTo(minRamBytesUsed()));
        MultiGeoPointValues fieldValues = ((AbstractAtomicGeoPointFieldData) fieldData).getGeoPointValues();
        assertValues(fieldValues, 0);
        assertMissing(fieldValues, 1);
        assertValues(fieldValues, 2);
    }
}
Also used : LeafReaderContext(org.apache.lucene.index.LeafReaderContext) AbstractAtomicGeoPointFieldData(org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData)

Aggregations

LeafReaderContext (org.apache.lucene.index.LeafReaderContext)4 AbstractAtomicGeoPointFieldData (org.elasticsearch.index.fielddata.plain.AbstractAtomicGeoPointFieldData)4