You can use the following attributes
to configure the InverseRangeIndex plug-in. These
attributes define properties on how the index is built.
Attributes
- Name
- Specifies the name of the index. The name must be unique for each
map. The name is used to retrieve the index object from the object
map instance for the backing map.
- AddressableKeyName
- Specifies the prefix for attribute names to be read from the indexing
key. If the prefix is set, the indexing logic checks the attribute
names that are prefixed with this value and use dot as path separator.
This attribute is optional and the default value for this attribute
is "key". All attribute names which do not have this prefix are treated
as value attributes. The property is not applicable when using serializer.
Note: AddressableKeyName property
is only applicable for indexing key attribute names and cannot be
used as a search key attribute.
- AttributeName
- Comma-delimited values of attribute names to be included in the
query for the inverse range index. The syntax for AttributeName can
consist of:
- one or more non-range attributes and one or more simple range
attributes;
- one or more non-range attributes and only one multi-range attribute.
Therefore, the syntax for AttributeName is: attribute_name_string ::= ({non_range_attribute}, {simple_range_attribute})
| ({non_range_attribute}, multi_range_attribute)
non_range_attribute ::= (search_attribute_name, "[", index_attribute_name, "]")
| (index_attribute_name);
simple_range_attribute ::= search_attribute_name "
[" low_index_attribute_name "," high_index_attribute_name "]";
multi_range_attribute ::= [search_attribute_list_name]
"[[" index_attribute_list_name "]]";
- There are three types of attributes:
- non_range_attribute
A non-range attribute.
The syntax is composed of an optional search key name and a required
indexing key name.
Use the search_attribute_name to
search for the attribute name in an inverse range search key. When
this attribute is not specified, the index_attribute_name attribute
is used. The index_attribute_name attribute
is required and specifies a non-range attribute as part of the inverse
range index key. The following example shows a non-range attribute
for the following definition of InverseRangeIndex: <backingMapPluginCollection id="productData">
<bean id="MapIndexPlugin"
className="com.ibm.websphere.objectgrid.plugins.index.InverseRangeIndex">
<property name="Name" type="java.lang.String"
value="InverseRangeIndex"description="inverse range index"/>
<property name="AddressableKeyName"
type="java.lang.String"value="KeyAttribute"
description="attribute name for range values"/>
<property name="AttributeName" type="java.lang.String"
value="productName KeyAttribute.productName],promotionDate
KeyAttribute.startPromotionDate,
KeyAttribute.endPromotionDate],RAM[KeyAttribute.minRAM,KeyAttribute.maxRAM],
condition[KeyAttribute.condition],KeyAttribute.country"
description="attribute name for inverse range index"/>
</bean>
</backingMapPluginCollection>
productName
, condition
, and country
are
non-range attributes looked up in the key and the same names are used
for the index search key.
startPromotionDate
and endPromotionDate
are
read from the key and treated as one simple range attribute. promotionDate
are
read from the search key for findAll(Object searchKey) operation.
minRAM
and maxRAM
are read from
the key and treated as one simple range attribute. RAM
are
read from the search key for findAll(Object searchKey) operation.
- simple_range_attribute
Contains boundary
values for a range. The syntax is composed of a required search key
name and required indexing key names. Use the search_attribute_name attribute
to search for the attribute name in an inverse range search key. The low_index_attribute_name attribute
specifies a low boundary value and the corresponding high_index_attribute_name attribute
specifies a high boundary value. The index keys are both required
and used as part of the inverse range index key.
- multi_range_attribute
An array or list
of range attributes in which each element occurs again in an array
or list with two boundary values.
The syntax is composed of an
optional search key name and required indexing key names. Use the search_attribute_list_names attribute
to search for an attribute name in a list or an array as part of an
inverse range search key. When this attribute is not specified, the index_attribute_list_name is
used. This attribute is required and must be used as part of the inverse
range index key. Each element in the list or array must occur again
in the list or array with two values. The two values are the low and
high boundary values for a range. The following example shows a
multi-range attribute for InverseRangeIndex:
<backingMapPluginCollection id="productData">
<bean id="MapIndexPlugin"
<className="com.ibm.websphere.objectgrid.plugins.index.InverseRangeIndex">
<property name="Name" type="java.lang.String"
value="InverseRangeIndex"
description="inverse range index "/>
<property name="AttributeName" type="java.lang.String"
value="key.identifier,rangeValues [[key.rangeValues]]"
description="attribute name for inverse range index" />
</bean>
</backingMapPluginCollection>
- FieldAccessAttribute
- Used for non-entity maps. If true, the
object is accessed using the fields directly. If not specified or false,
the getter method for the attribute is used to access the data.