- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for isBadWord (0.16 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
src/test/java/org/codelibs/fess/suggest/entity/SuggestItemTest.java
// Test isBadWord method String[] text = { "test", "text" }; String[][] readings = { { "test" }, { "text" } }; SuggestItem item = new SuggestItem(text, readings, null, 0L, 0L, 1.0f, null, null, null, SuggestItem.Kind.QUERY); // Test with no bad words String[] badWords = { "spam", "illegal" }; assertFalse(item.isBadWord(badWords));Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Mon Sep 01 13:33:03 GMT 2025 - 16.7K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/suggest/entity/SuggestItemBoundaryTest.java
} @Test public void test_isBadWord_exactMatch() { String[] text = { "bad" }; String[][] readings = { { "bad" } }; SuggestItem item = new SuggestItem(text, readings, null, 0L, 0L, 1.0f, null, null, null, SuggestItem.Kind.QUERY); String[] badWords = { "bad" }; assertTrue("Should match exact", item.isBadWord(badWords)); }Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sat Jan 17 05:10:37 GMT 2026 - 22.2K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/suggest/entity/SuggestItem.java
* Checks if the suggest item contains any of the given bad words. * @param badWords The array of bad words. * @return True if the item contains a bad word, false otherwise. */ public boolean isBadWord(final String[] badWords) { for (final String badWord : badWords) { if (text.contains(badWord)) { return true; } } return false; }Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sun Feb 01 12:48:24 GMT 2026 - 13.5K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/suggest/index/operations/IndexingOperations.java
*/ public SuggestIndexResponse index(final String index, final SuggestItem[] items, final String[] badWords) { final SuggestItem[] filteredItems = Stream.of(items).filter(item -> !item.isBadWord(badWords)).toArray(SuggestItem[]::new); if (logger.isDebugEnabled()) { logger.debug("Indexing suggest items: index={}, totalItems={}, validItems={}, filteredByBadWords={}", index, items.length,Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sun Feb 01 12:48:24 GMT 2026 - 3.9K bytes - Click Count (0)