XQuery and count

We used the example db RealEstate
and used XQuery following

http://localhost/tamino/welcome3_1_1_4/RealEstate?_xql=count(/Property[Address/State=‘CA’])

the last doc of the results has <ino:cursor ino:count=“8”>

then we used
http://localhost/tamino/welcome3_1_1_4/RealEstate?_xql(1,2)=/Property[Address/State=‘CA’]

the last doc of the results has <ino:cursor ino:count=“15”>

then we used
http://localhost/tamino/welcome3_1_1_4/RealEstate?_xql(5,2)=/Property[Address/State=‘CA’]

the last doc of the results has <ino:cursor ino:count=“10”>

then we used
http://localhost/tamino/welcome3_1_1_4/RealEstate?_xql(1,2)=/Property sortby(Address/State)

the results were all the docs in the db

why the number of the results is different?

please help us,

best regards,

Michael

Hi

]http://localhost/tamino/welcome3_1_1_4/RealEstate?_xql=count(/Property[Address/State=‘CA’])

Here you got what you wanted. 8 is precise number of documents with Address/State=‘CA’

]http://localhost/tamino/welcome3_1_1_4/RealEstate?_xql(5,2)=/Property[Address/State=‘CA’]

ino:count attribute doesn’t always give precise results. To make it work in your example define index on Address/State element and you’ll get 8 again.

This problem has already been discussed in this forum. Check
http://tamino.forums.softwareag.com/viewtopic.php?p=7333
for more information

]http://localhost/tamino/welcome3_1_1_4/RealEstate?_xql(5,2)=/Property[Address/State=‘CA’]

the same answer here

http://localhost/tamino/welcome3_1_1_4/RealEstate?_xql(1,2)=/Property sortby(Address/State)

this seems to be fine