Merge branch 'stable-2.10'

* stable-2.10:
  Remove uneeded dependency in ChangesCollection
  Delete a change from the index when it is not in the DB

Change-Id: I02a4773dd581c29704a7cc45c5225258d657f836
This commit is contained in:
Dave Borowitz
2014-11-12 10:13:32 -08:00
8 changed files with 83 additions and 6 deletions

View File

@@ -330,6 +330,19 @@ public class LuceneChangeIndex implements ChangeIndex {
}
}
@SuppressWarnings("unchecked")
@Override
public void delete(int id) throws IOException {
Term idTerm = QueryBuilder.idTerm(id);
try {
Futures.allAsList(
openIndex.delete(idTerm),
closedIndex.delete(idTerm)).get();
} catch (ExecutionException | InterruptedException e) {
throw new IOException(e);
}
}
@Override
public void deleteAll() throws IOException {
openIndex.deleteAll();