* @throws RepositoryException
*/
private Set<String> getNodes(final org.apache.lucene.search.Query query) throws RepositoryException
{
Set<String> result = new HashSet<String>();
QueryHits hits = null;
try
{
hits = handler.executeQuery(query);
ScoreNode sn;
while ((sn = hits.nextScoreNode()) != null)
{
result.add(sn.getNodeId());
}
return result;
}
catch (IndexOfflineIOException e)
{
throw new IndexOfflineRepositoryException(e.getMessage(), e);
}
catch (IOException e)
{
throw new RepositoryException(e.getLocalizedMessage(), e);
}
finally
{
if (hits != null)
{
try
{
hits.close();
}
catch (IOException e)
{
LOG.error("Can not close QueryHits.", e);
}