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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user