Search in sources :

Example 11 with RangeIndex

use of org.apache.geode.cache.query.internal.index.RangeIndex in project geode by apache.

the class IndexCreationJUnitTest method testIndexCreationWithFunctions.

@Test
public void testIndexCreationWithFunctions() throws Exception {
    // Task ID : ICM14
    QueryService qs;
    qs = CacheUtils.getQueryService();
    Index i1 = qs.createIndex("SetSecIDIndex1", IndexType.FUNCTIONAL, "b.secId", "/portfolios.asSet pf, pf.positions.values b");
    Index i2 = qs.createIndex("ListSecIDIndex2", IndexType.FUNCTIONAL, "b.secId", "/portfolios.asList pf, pf.positions.values b");
    Index i3 = qs.createIndex("ArraySecIDIndex3", IndexType.FUNCTIONAL, "b.secId", "/portfolios.toArray pf, pf.positions.values b");
    CacheUtils.log(((RangeIndex) i1).dump());
    CacheUtils.log(((RangeIndex) i2).dump());
    CacheUtils.log(((RangeIndex) i3).dump());
}
Also used : DefaultQueryService(org.apache.geode.cache.query.internal.DefaultQueryService) QueryService(org.apache.geode.cache.query.QueryService) RangeIndex(org.apache.geode.cache.query.internal.index.RangeIndex) CompactMapRangeIndex(org.apache.geode.cache.query.internal.index.CompactMapRangeIndex) Index(org.apache.geode.cache.query.Index) CompactRangeIndex(org.apache.geode.cache.query.internal.index.CompactRangeIndex) Test(org.junit.Test) IntegrationTest(org.apache.geode.test.junit.categories.IntegrationTest)

Aggregations

RangeIndex (org.apache.geode.cache.query.internal.index.RangeIndex)11 Test (org.junit.Test)11 CompactRangeIndex (org.apache.geode.cache.query.internal.index.CompactRangeIndex)10 Index (org.apache.geode.cache.query.Index)9 QueryService (org.apache.geode.cache.query.QueryService)9 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)7 Query (org.apache.geode.cache.query.Query)6 SelectResults (org.apache.geode.cache.query.SelectResults)6 PdxString (org.apache.geode.pdx.internal.PdxString)6 CacheException (org.apache.geode.cache.CacheException)5 Region (org.apache.geode.cache.Region)5 PortfolioPdx (org.apache.geode.cache.query.data.PortfolioPdx)5 PartitionedIndex (org.apache.geode.cache.query.internal.index.PartitionedIndex)5 IOException (java.io.IOException)4 AttributesFactory (org.apache.geode.cache.AttributesFactory)4 PartitionAttributesFactory (org.apache.geode.cache.PartitionAttributesFactory)4 Portfolio (org.apache.geode.cache.query.data.Portfolio)4 DefaultQuery (org.apache.geode.cache.query.internal.DefaultQuery)4 DefaultQueryService (org.apache.geode.cache.query.internal.DefaultQueryService)4 CompactMapRangeIndex (org.apache.geode.cache.query.internal.index.CompactMapRangeIndex)4