Remove unused insert method from secondary index interface
The `insert` method is not used anywhere. The `replace` method is used instead. Change-Id: Ie47253149cacde9a0824e4dee4d80313acd33188
This commit is contained in:
@@ -279,26 +279,6 @@ public class LuceneChangeIndex implements ChangeIndex {
|
||||
return schema;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void insert(ChangeData cd) throws IOException {
|
||||
Term id = QueryBuilder.idTerm(cd);
|
||||
Document doc = toDocument(cd);
|
||||
try {
|
||||
if (cd.change().getStatus().isOpen()) {
|
||||
Futures.allAsList(
|
||||
closedIndex.delete(id),
|
||||
openIndex.insert(doc)).get();
|
||||
} else {
|
||||
Futures.allAsList(
|
||||
openIndex.delete(id),
|
||||
closedIndex.insert(doc)).get();
|
||||
}
|
||||
} catch (OrmException | ExecutionException | InterruptedException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void replace(ChangeData cd) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user