GridGain Community Edition

Expand all | Collapse all

Spring Indexing example

  • 1.  Spring Indexing example

    Posted 06-25-2019 02:59 PM
    Hello all. I'm looking for a way to sort createdTime descending and processedTime ascending. What would the definition look
    like? Here's the index definition

    <constructor-arg value="SORTED"/>

  • 2.  RE: Spring Indexing example

    Posted 06-26-2019 03:04 AM

    You will need to use (LinkedHashMap, QueryIndexType) constructor for that:

    <bean class="org.apache.ignite.cache.QueryIndex">
    <map value-type="java.lang.Boolean">
    <entry key="recId" value="true"/>
    <entry key="createdTime" value="false"/>
    <entry key="processedTime" value="true"/>
    <entry key="partitionId" value="true"/>
    <constructor-arg value="SORTED"/>

    Something like that!

    Ilya Kasnacheev
    Community Support Specialist