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:
@@ -146,25 +146,6 @@ class SolrChangeIndex implements ChangeIndex, LifecycleListener {
|
||||
stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insert(ChangeData cd) throws IOException {
|
||||
String id = cd.getId().toString();
|
||||
SolrInputDocument doc = toDocument(cd);
|
||||
try {
|
||||
if (cd.change().getStatus().isOpen()) {
|
||||
closedIndex.deleteById(id);
|
||||
openIndex.add(doc);
|
||||
} else {
|
||||
openIndex.deleteById(id);
|
||||
closedIndex.add(doc);
|
||||
}
|
||||
} catch (OrmException | SolrServerException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
commit(openIndex);
|
||||
commit(closedIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replace(ChangeData cd) throws IOException {
|
||||
String id = cd.getId().toString();
|
||||
|
||||
Reference in New Issue
Block a user