Search in sources :

Example 1 with QueryMultilingualAnalyzer

use of org.apache.jena.query.text.analyzer.QueryMultilingualAnalyzer in project jena by apache.

the class TextIndexLucene method getQueryAnalyzer.

private Analyzer getQueryAnalyzer(boolean usingSearchFor, String lang) {
    if (usingSearchFor) {
        Analyzer qa = multilingualQueryAnalyzers.get(lang);
        if (qa == null) {
            qa = new PerFieldAnalyzerWrapper(new QueryMultilingualAnalyzer(defaultAnalyzer, lang), analyzerPerField);
            multilingualQueryAnalyzers.put(lang, qa);
        }
        return qa;
    } else {
        return queryAnalyzer;
    }
}
Also used : QueryMultilingualAnalyzer(org.apache.jena.query.text.analyzer.QueryMultilingualAnalyzer) KeywordAnalyzer(org.apache.lucene.analysis.core.KeywordAnalyzer) StandardAnalyzer(org.apache.lucene.analysis.standard.StandardAnalyzer) IndexingMultilingualAnalyzer(org.apache.jena.query.text.analyzer.IndexingMultilingualAnalyzer) MultilingualAnalyzer(org.apache.jena.query.text.analyzer.MultilingualAnalyzer) QueryMultilingualAnalyzer(org.apache.jena.query.text.analyzer.QueryMultilingualAnalyzer) Analyzer(org.apache.lucene.analysis.Analyzer) PerFieldAnalyzerWrapper(org.apache.lucene.analysis.miscellaneous.PerFieldAnalyzerWrapper)

Aggregations

IndexingMultilingualAnalyzer (org.apache.jena.query.text.analyzer.IndexingMultilingualAnalyzer)1 MultilingualAnalyzer (org.apache.jena.query.text.analyzer.MultilingualAnalyzer)1 QueryMultilingualAnalyzer (org.apache.jena.query.text.analyzer.QueryMultilingualAnalyzer)1 Analyzer (org.apache.lucene.analysis.Analyzer)1 KeywordAnalyzer (org.apache.lucene.analysis.core.KeywordAnalyzer)1 PerFieldAnalyzerWrapper (org.apache.lucene.analysis.miscellaneous.PerFieldAnalyzerWrapper)1 StandardAnalyzer (org.apache.lucene.analysis.standard.StandardAnalyzer)1