All,

Index pattern format has changed as discussed some time ago and now it
can include more information about element/attribute being indexed.

New pattern format consists of a path to an element (instead of just
an element name), optionally following by '@' and an attribute name. A
path can have one or more element names, separated by '/'. where every
element is a child of a previous element. Path can be absolute or
relative, where absolute path starts with '/'  and walks the path from
document root. Wildcard ('*') can be used to match any
element/attribute name.

Examples of index patterns:
/person/address/street
/person/*/name
address/[EMAIL PROTECTED]
name
[EMAIL PROTECTED]

Note that [EMAIL PROTECTED] format is a case of a relative path with just one
element in it, and therefore all old index patterns are valid.

New index pattern format can be useful in case when same
element/attribute name is used
in different parts of document and has different meaning or data type.

As before, XPath queries use indexes if indexes with matching patterns
are found. An index pattern is considered matching to a query path if
the pattern is exactly the same as the path or less specific.

Examples:
Query '/person/address/street[string-length() > 20]' can use indexes
with index patterns '/person/address/street' (best-case scenario),
'address/street' or 'address/*'.

Query '//address/street[string-length() > 20]' can use indexes with
index patterns 'address/street' (best-case scenario) or 'address/*',
but won't use index with the pattern '/person/address/street'.

Other than that, there should be no changes in database behavior.
Binary index format has not changed.

Regards,
Natalia

Reply via email to