Search in sources :

Example 1 with EsUrlQueueService

use of org.codelibs.fess.crawler.service.impl.EsUrlQueueService in project fess by codelibs.

the class WebFsIndexHelper method deleteCrawlData.

protected void deleteCrawlData(final String sid) {
    final EsUrlFilterService urlFilterService = ComponentUtil.getComponent(EsUrlFilterService.class);
    final EsUrlQueueService urlQueueService = ComponentUtil.getComponent(EsUrlQueueService.class);
    final EsDataService dataService = ComponentUtil.getComponent(EsDataService.class);
    try {
        // clear url filter
        urlFilterService.delete(sid);
    } catch (final Exception e) {
        logger.warn("Failed to delete UrlFilter for {}", sid, e);
    }
    try {
        // clear queue
        urlQueueService.clearCache();
        urlQueueService.delete(sid);
    } catch (final Exception e) {
        logger.warn("Failed to delete UrlQueue for {}", sid, e);
    }
    try {
        // clear
        dataService.delete(sid);
    } catch (final Exception e) {
        logger.warn("Failed to delete AccessResult for {}", sid, e);
    }
}
Also used : EsUrlFilterService(org.codelibs.fess.crawler.service.impl.EsUrlFilterService) EsUrlQueueService(org.codelibs.fess.crawler.service.impl.EsUrlQueueService) EsDataService(org.codelibs.fess.crawler.service.impl.EsDataService)

Aggregations

EsDataService (org.codelibs.fess.crawler.service.impl.EsDataService)1 EsUrlFilterService (org.codelibs.fess.crawler.service.impl.EsUrlFilterService)1 EsUrlQueueService (org.codelibs.fess.crawler.service.impl.EsUrlQueueService)1