SearchIndexHelperServiceImpl.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:herd 作者:
@Override
@Async
public Future<Void> indexAllTags(SearchIndexKey searchIndexKey, String documentType)
{
    // Get a list of all tags
    final List<TagEntity> tagEntities = Collections.unmodifiableList(tagDao.getTags());

    // Index all tags.
    tagHelper.executeFunctionForTagEntities(searchIndexKey.getSearchIndexName(), documentType, tagEntities, indexFunctionsDao::createIndexDocument);

    // Simple count validation, index size should equal entity list size.
    validateSearchIndexSize(searchIndexKey.getSearchIndexName(), documentType, tagEntities.size());

    // Update search index status to READY.
    searchIndexDaoHelper.updateSearchIndexStatus(searchIndexKey, SearchIndexStatusEntity.SearchIndexStatuses.READY.name());

    // Return an AsyncResult so callers will know the future is "done". They can call "isDone" to know when this method has completed and they can call
    // "get" to see if any exceptions were thrown.
    return new AsyncResult<>(null);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号