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);
}
}
Aggregations