Indexing for query in format "//"

query 1: /div[@id=“5”]/note
with index created on attribute “id”, the processor will use the index

query 2: //div[@id=“5”]/note
with multipath indexed created on attribute “id”, the processor will use the index

query 3: /div[@id=“5”]//note
query 4: //div[@id=“5”]//note
no matter what kind of index created on “id”, no index is used.

how can I create index so that query 3 and 4 can use the index.

Hi Eric,

in principal, Tamino is supposed to find indexes even if the field is specified
using //. There are however cases where this can not work.
…div//node tries to find all ‘node’ element children possibly below ‘div’
elements. If your schema is closed-content and there is no ‘anyType’
content model for ‘div’ or any of its descendants, these are exactly the
same ‘node’ elements that are specified by div/node. Otherwise, there
might be ‘node’ element below ‘div’ which are not contained in the index.
Than the index is not used.
If these exception conditions do not apply in your case, i.e. your schema
is closed-content and you do not specify ‘anyType’ anywhere below ‘div’,
I am afraid it is a bug in Tamino.

Regards,
Juliane.