Package org.apache.lucene.analysis.de

Examples of org.apache.lucene.analysis.de.GermanAnalyzer


        analyzerProviderFactories.put("danish", new PreBuiltAnalyzerProviderFactory("danish", AnalyzerScope.INDICES, new DanishAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("english", new PreBuiltAnalyzerProviderFactory("english", AnalyzerScope.INDICES, new EnglishAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("finnish", new PreBuiltAnalyzerProviderFactory("finnish", AnalyzerScope.INDICES, new FinnishAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("french", new PreBuiltAnalyzerProviderFactory("french", AnalyzerScope.INDICES, new FrenchAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("galician", new PreBuiltAnalyzerProviderFactory("galician", AnalyzerScope.INDICES, new GalicianAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("german", new PreBuiltAnalyzerProviderFactory("german", AnalyzerScope.INDICES, new GermanAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("greek", new PreBuiltAnalyzerProviderFactory("greek", AnalyzerScope.INDICES, new GreekAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("hindi", new PreBuiltAnalyzerProviderFactory("hindi", AnalyzerScope.INDICES, new HindiAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("hungarian", new PreBuiltAnalyzerProviderFactory("hungarian", AnalyzerScope.INDICES, new HungarianAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("indonesian", new PreBuiltAnalyzerProviderFactory("indonesian", AnalyzerScope.INDICES, new IndonesianAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("italian", new PreBuiltAnalyzerProviderFactory("italian", AnalyzerScope.INDICES, new ItalianAnalyzer(Lucene.ANALYZER_VERSION)));
View Full Code Here


    private final GermanAnalyzer analyzer;

    @Inject public GermanAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) {
        super(index, indexSettings, name, settings);
        analyzer = new GermanAnalyzer(version,
                Analysis.parseStopWords(env, settings, GermanAnalyzer.getDefaultStopSet()),
                Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET));
    }
View Full Code Here

       
       
        if(language.equals("english"))
          analyzer= new StandardAnalyzer();
        else if(language.equals("german"))    
          analyzer= new GermanAnalyzer();
        else if(language.equals("russian"))  
          analyzer= new RussianAnalyzer();
        else if(language.equals("dutch"))    
          analyzer= new DutchAnalyzer();
        else if(language.equals("french"))    
View Full Code Here

    /**
     * Creates a new instance of <code>LuceneManager</code>.
     */
    protected LuceneManager()
    {
        analyzer = new GermanAnalyzer();
    }
View Full Code Here

        assertThat(query, instanceOf(BooleanQuery.class));
    }

    @Test
    public void testCrossFieldMatchType() throws Exception {
        Analyzer analyzer = new GermanAnalyzer(Version.LUCENE_4_9);
        SearchContext searchContext = mock(SearchContext.class);
        MapperService.SmartNameFieldMappers smartNameFieldMappers = mock(MapperService.SmartNameFieldMappers.class);
        when(searchContext.smartFieldMappers(anyString())).thenReturn(smartNameFieldMappers);
        when(smartNameFieldMappers.hasMapper()).thenReturn(true);
        FieldMapper fieldMapper = mock(FieldMapper.class, Answers.RETURNS_MOCKS.get());
View Full Code Here

        Query query = builder.query(fields, new BytesRef("foo"));
        assertThat(query, instanceOf(MultiPhrasePrefixQuery.class));
    }

    private SearchContext mockSearchContext() {
        Analyzer analyzer = new GermanAnalyzer(Version.LUCENE_4_9);
        SearchContext searchContext = mock(SearchContext.class);
        MapperService mapperService = mock(MapperService.class);
        when(searchContext.mapperService()).thenReturn(mapperService);
        when(mapperService.searchAnalyzer()).thenReturn(analyzer);
        return searchContext;
View Full Code Here

    private final GermanAnalyzer analyzer;

    @Inject
    public GermanAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) {
        super(index, indexSettings, name, settings);
        analyzer = new GermanAnalyzer(Analysis.parseStopWords(env, settings, GermanAnalyzer.getDefaultStopSet()),
                                      Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET));
        analyzer.setVersion(version);
    }
View Full Code Here

TOP

Related Classes of org.apache.lucene.analysis.de.GermanAnalyzer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.