mirror of
https://github.com/sismics/docs.git
synced 2024-12-22 11:23:48 +01:00
indexing in transactional context
This commit is contained in:
parent
229d845a42
commit
5c5a3f614f
@ -38,9 +38,9 @@ public class DocumentCreatedAsyncListener {
|
||||
contributor.setDocumentId(event.getDocument().getId());
|
||||
contributor.setUserId(event.getUserId());
|
||||
contributorDao.create(contributor);
|
||||
|
||||
// Update Lucene index
|
||||
AppContext.getInstance().getIndexingHandler().createDocument(event.getDocument());
|
||||
});
|
||||
|
||||
// Update Lucene index
|
||||
AppContext.getInstance().getIndexingHandler().createDocument(event.getDocument());
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class DocumentUpdatedAsyncListener {
|
||||
}
|
||||
|
||||
TransactionUtil.handle(() -> {
|
||||
// Update Lucene index
|
||||
// Update index
|
||||
DocumentDao documentDao = new DocumentDao();
|
||||
Document document = documentDao.getById(event.getDocumentId());
|
||||
if (document == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user