Space Index

Index Types

The index type is determined by the SpaceIndexType enumeration. The index types are:

NONE - No indexing is used.

EQUAL - performs equality matching (equal to/not equal to).

ORDERED - performs ordered matching (bigger than/less than).

EQUAL_AND_ORDERED - performs both equality and ordered matching, and uses a larger memory footprint than the other indexing types.

The BASIC and EXTENDED index types have been deprecated as of version 12.3.

Indexing at Design Time

Specifying which properties of a class are indexed is done using attributes or gs.xml.

public class Person
    public String FirstName{ get; set;}

    public String LastName{ get; set; }

    public int? Age{ get; set; }
    <class name="Gigaspaces.Examples.Person"
        persist="false" replicate="false" fifo="false" >
        <property name="lastName">
            <index type="EQUAL"/>
        <property name="firstName">
            <index type="EQUAL"/>
        <property name="age">
             <index type="ORDERED"/>


By default, a property's index is inherited in sub-classes (i.e. if a property is indexed in a superclass, it is also indexed in a sub-class). If you need to change the index type of a property in a sub-class, you can override the property and annotate it with [SpaceIndex] using the requested index type (to disable indexing. use None).