You can use the following attributes to configure the HashIndex plug-in.
When the AttributeName property of HashIndex includes multiple attribute names, the HashIndex is a composite index. Otherwise, if it includes only one attribute name, it is a single-attribute index. For example, the AttributeName property value of a composite HashIndex might be city,state,zipcode. It includes three attributes delimited by commas. If the AttributeName property value is only zipcode that only has one attribute, it is a single-attribute HashIndex.
For more information, see Using a composite index.
If the indexed attribute of single-attribute HashIndex is a relationship, either single- or multi-valued, the HashIndex is a relationship HashIndex. For relationship HashIndex, the RangeIndex property of HashIndex must set to “false”.
For non-entity maps, when the POJOKeyIndex property of HashIndex is set to true, the HashIndex is a key HashIndex and the key part of entry are used for indexing. When the AttributeName property of HashIndex is not specified, the whole key is indexed; otherwise, the key HashIndex can only be a single-attribute HashIndex.
When the RangeIndex property of HashIndex is set to true, the HashIndex is a range index and can support the MapRangeIndex interface. A MapRangeIndex implementation supports functions to find data using range functions, such as greater than, less than, or both, while a MapIndex supports equals functions only. For a single-attribute index, the RangeIndex property can be set to true only if the indexed attribute is of type Comparable. If the single-attribute index will be used by query, the RangeIndex property must set to true and the indexed attribute must be of type Comparable. For relationship HashIndex and composite HashIndex, the RangeIndex property must set to false.
The preceding sample is a range HashIndex because the RangeIndex property value is true.
The following table provides a summary for using range index.
HashIndex type | Supports range index |
---|---|
Single-attribute HashIndex: indexed key or attribute is of type Comparable | Yes |
Single-attribute HashIndex: indexed key or attribute is not of type Comparable | No |
Composite HashIndex | No |
Relationship HashIndex | No |