- CollectionSupport cs = graph.getService(CollectionSupport.class);
- SerialisationSupport support = graph.getService(SerialisationSupport.class);
-
- List<Resource> result = cs.createList();
-
- ResourceVisitor visitor = new ResourceVisitor();
-
- for (ScoreDoc scoreDoc : docs.scoreDocs) {
- try {
- reader.document(scoreDoc.doc, visitor);
- result.add(support.getResource(visitor.id));
- } catch (CorruptIndexException e) {
- getLogger().error("Index is corrupted! {}", this, e);
- throw new DatabaseException(e);
- } catch (IOException e) {
- getLogger().error("Index is in problematic state! {}", this, e);
- throw new DatabaseException(e);
+ CollectionSupport cs = graph.getService(CollectionSupport.class);
+ SerialisationSupport support = graph.getService(SerialisationSupport.class);
+
+ List<Resource> result = cs.createList();
+
+ ResourceVisitor visitor = new ResourceVisitor();
+
+ for (ScoreDoc scoreDoc : docs.scoreDocs) {
+ try {
+ reader.document(scoreDoc.doc, visitor);
+ result.add(support.getResource(visitor.id));
+ } catch (CorruptIndexException e) {
+ getLogger().error("Index is corrupted! {}", this, e);
+ throw new IndexCorruptedException("Index is corrupted! " + " " + this + " " + scoreDoc, e);
+ } catch (IOException e) {
+ getLogger().error("Index is in problematic state! {}", this, e);
+ throw new IndexingException(e);
+ }