Hi,
when I have established a connection to Tamino (V4.1.1.1) and do a query against a certain collection, which contains about 20000 documents, my Java programm just hangs (because of the huge amount of returned data).
I have tried to limit the number of returned documents with the PAGE_SIZE in the query-method, but as I interpreted the documentation, the PAGE_SIZE just tells how many documents are fetched at one time (opposed to always fetching one document at a time, fetching more documents can enhance the performance):
>>>>>>>>>>>>>>
TResponse response = accessor.query(query , PAGE_SIZE);
TXMLObjectIterator xmlObjectIterator = response.getXMLObjectIterator();
// Write the XML content into a StringWriter
StringWriter stringWriter = new StringWriter();
while(xmlObjectIterator.hasNext()) {
try {
TXMLObject xo = xmlObjectIterator.next();
xo.writeTo(stringWriter);
} catch(Exception e) {}
}
<<<<<<<<<<<<<<<<
So the ObjectIterator automatically fetches the next PAGE_SIZE-amount of documents until all are fetched.
Can I limit the number of returned documents without having to read all of them?
Tanks for any help,
Robert
Have a nice day,
Rob
#webMethods#webMethods-Tamino-XML-Server-APIs#API-Management