Search in sources :

Example 6 with BadWord

use of org.codelibs.fess.es.config.exentity.BadWord in project fess by codelibs.

the class SuggestHelper method storeAllBadWords.

public void storeAllBadWords() {
    deleteAllBadWords();
    final List<BadWord> list = badWordBhv.selectList(cb -> {
        cb.query().matchAll();
        cb.fetchFirst(ComponentUtil.getFessConfig().getPageBadWordMaxFetchSizeAsInteger());
    });
    for (final BadWord badWord : list) {
        final String word = badWord.getSuggestWord();
        suggester.indexer().addBadWord(word);
    }
}
Also used : BadWord(org.codelibs.fess.es.config.exentity.BadWord)

Aggregations

BadWord (org.codelibs.fess.es.config.exentity.BadWord)6 List (java.util.List)4 BadWordPager (org.codelibs.fess.app.pager.BadWordPager)4 Reader (java.io.Reader)3 Writer (java.io.Writer)3 Resource (javax.annotation.Resource)3 AdminBadwordAction.getBadWord (org.codelibs.fess.app.web.admin.badword.AdminBadwordAction.getBadWord)3 ApiResult (org.codelibs.fess.app.web.api.ApiResult)3 Execute (org.lastaflute.web.Execute)3 CsvConfig (com.orangesignal.csv.CsvConfig)2 CsvWriter (com.orangesignal.csv.CsvWriter)2 BufferedReader (java.io.BufferedReader)2 BufferedWriter (java.io.BufferedWriter)2 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 InputStreamReader (java.io.InputStreamReader)2 OutputStreamWriter (java.io.OutputStreamWriter)2 Files (java.nio.file.Files)2 Path (java.nio.file.Path)2 ArrayList (java.util.ArrayList)2