// process results
while (results.hasNext()) {
XmlValue value = results.next();
byte[] content = value.asDocument().getContent();
if (content.length > 0) {
documents.put(value.asDocument().getName(),
handleDocument(m_policyReader.readPolicy(content),policyFinder));
} else {
throw new PolicyIndexException("Zero-length result found");