From 6109d25816970da51877efbec1ff22f04a48a08e Mon Sep 17 00:00:00 2001 From: _Bastler Date: Sat, 4 Dec 2021 11:05:37 +0100 Subject: [PATCH] fix index --- src/main/java/de/bstly/board/LuceneConfig.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/bstly/board/LuceneConfig.java b/src/main/java/de/bstly/board/LuceneConfig.java index 1a47abb..9137211 100644 --- a/src/main/java/de/bstly/board/LuceneConfig.java +++ b/src/main/java/de/bstly/board/LuceneConfig.java @@ -4,10 +4,9 @@ package de.bstly.board; import org.apache.lucene.analysis.core.LowerCaseFilterFactory; -import org.apache.lucene.analysis.core.WhitespaceTokenizerFactory; import org.apache.lucene.analysis.miscellaneous.ASCIIFoldingFilterFactory; -import org.apache.lucene.analysis.ngram.EdgeNGramFilterFactory; import org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory; +import org.apache.lucene.analysis.standard.StandardTokenizerFactory; import org.hibernate.search.backend.lucene.analysis.LuceneAnalysisConfigurationContext; import org.hibernate.search.backend.lucene.analysis.LuceneAnalysisConfigurer; import org.springframework.context.annotation.Configuration; @@ -26,12 +25,12 @@ public class LuceneConfig implements LuceneAnalysisConfigurer { */ @Override public void configure(LuceneAnalysisConfigurationContext context) { - context.analyzer("english").custom().tokenizer(WhitespaceTokenizerFactory.class) + context.analyzer("english").custom().tokenizer(StandardTokenizerFactory.class) .tokenFilter(LowerCaseFilterFactory.class) .tokenFilter(SnowballPorterFilterFactory.class).param("language", "English") .tokenFilter(ASCIIFoldingFilterFactory.class); - context.analyzer("german").custom().tokenizer(WhitespaceTokenizerFactory.class) + context.analyzer("german").custom().tokenizer(StandardTokenizerFactory.class) .tokenFilter(LowerCaseFilterFactory.class) .tokenFilter(SnowballPorterFilterFactory.class).param("language", "German") .tokenFilter(ASCIIFoldingFilterFactory.class);