Skip to content

Commit

Permalink
SHIBUI-997: wipe out indext for each resolver before init/update
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Nov 19, 2018
1 parent f79efd5 commit 5b6ae71
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public Iterable<EntityDescriptor> resolve(@Nullable CriteriaSet criteria) {
}

void addIndexedDescriptorsFromBackingStore(AbstractMetadataResolver.EntityBackingStore backingStore, String resourceId, IndexWriter indexWriter) throws ComponentInitializationException {
try {
indexWriter.deleteAll();
} catch (IOException e) {
logger.error(e.getMessage(), e);
}
for (String entityId : backingStore.getIndexedDescriptors().keySet()) {
Document document = new Document();
document.add(new StringField("id", entityId, Field.Store.YES));
Expand Down

0 comments on commit 5b6ae71

Please sign in to comment.