AnsweredAssumed Answered

Repository Service: Batching of results

Question asked by marian on Nov 2, 2007
Latest reply on Nov 8, 2007 by marian
Hi,

I am trying to batch results returned from a query.

I have specified a QueryConfiguration header with a deliberately small
fetchSize of 5. I still get all results returned, 52 rows in this case.

This is the SOAP message sent:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><QueryConfiguration xmlns="http://www.alfresco.org/ws/headers/1.0"><fetchSize>5</fetchSize></QueryConfiguration>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">  <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">    <wsu:Created>2007-11-02T11:30:12Z</wsu:Created>    <wsu:Expires>2007-11-02T11:40:12Z</wsu:Expires>  </wsu:Timestamp>  <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">    <wsse:Username>XXXX</wsse:Username>    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_861d100ecd803dab6bb7334c22d8f54f90fc88de</wsse:Password>  </wsse:UsernameToken></wsse:Security>
</SOAP-ENV:Header><SOAP-ENV:Body><query xmlns="http://www.alfresco.org/ws/service/repository/1.0"><store><scheme xmlns="http://www.alfresco.org/ws/model/content/1.0">workspace</scheme><address xmlns="http://www.alfresco.org/ws/model/content/1.0">SpacesStore</address></store><query><language xmlns="http://www.alfresco.org/ws/model/content/1.0">lucene</language><statement xmlns="http://www.alfresco.org/ws/model/content/1.0">PARENT:"workspace://SpacesStore/14ef9fd3-80b0-11dc-a1ee-bba12bf20df2"</statement></query><includeMetaData>true</includeMetaData></query></SOAP-ENV:Body></SOAP-ENV:Envelope>

As far as I can tell the queryConfiguration is there and looking good.

What am I doing wrong?

And as follow-up-question: Where can I find discussion on the semantics
of query()/fetchMore(). I am interested in what the querySession-String
actually means. Things like:

Will it be different after each fetchMore() or do I keep the one returned from query()?

How long is it valid? Especially: Can I have more than one batched query
per user-session open at the same time?

Do I need to, or can I, "close" a batched query when I am no longer
interested in fetching more results?

Thank you for reading this and devoting brain-cycles to my problem.

MM

Outcomes