use of com.apple.foundationdb.record.lucene.synonym.SynonymAnalyzer in project fdb-record-layer by FoundationDB.
the class LuceneAnalyzerTest method testSynonymAnalyzer.
@Test
void testSynonymAnalyzer() throws Exception {
String input = "Hello RL";
Collection<String> result = new HashSet<>();
tokenizeWithAnalyzer(result, input, new SynonymAnalyzer(null, EnglishSynonymMapConfig.CONFIG_NAME));
Assertions.assertEquals(ImmutableSet.of("hi", "how", "hullo", "howdy", "rl", "hello", "do", "you"), result);
}
Aggregations