Package org.apache.lucene.analysis.ru

Examples of org.apache.lucene.analysis.ru.RussianAnalyzer


    public ArrayList search(String line) {
        String field = "fileContent";
        try {
            searcher = new IndexSearcher(FSDirectory.open(new File(Vars.Lucene_Repo)));
            // stdanalyzer = new StandardAnalyzer(Version.LUCENE_30);
            analyzer = new RussianAnalyzer(Version.LUCENE_40);
            parser = new QueryParser(Version.LUCENE_40, field, analyzer);

            query = parser.parse(line);
            //System.out.println("Searching for: " + query.toString(field));
            outMultiData.add(query.toString(field));
View Full Code Here


     * @param language A string containing the name of the language.
     * @return Returns the type of Analyzer.
     */
    public PerFieldAnalyzerWrapper getAnalyzer(String language) {
        if (language.equals("russian")) {
            return (new PerFieldAnalyzerWrapper(new RussianAnalyzer(Version.LUCENE_40)));
        }
        if (language.equals("english")) {
            return (new PerFieldAnalyzerWrapper(new StandardAnalyzer(Version.LUCENE_40)));
        }

View Full Code Here

    private final RussianAnalyzer analyzer;

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

        analyzerProviderFactories.put("italian", new PreBuiltAnalyzerProviderFactory("italian", AnalyzerScope.INDICES, new ItalianAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("norwegian", new PreBuiltAnalyzerProviderFactory("norwegian", AnalyzerScope.INDICES, new NorwegianAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("persian", new PreBuiltAnalyzerProviderFactory("persian", AnalyzerScope.INDICES, new PersianAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("portuguese", new PreBuiltAnalyzerProviderFactory("portuguese", AnalyzerScope.INDICES, new PortugueseAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("romanian", new PreBuiltAnalyzerProviderFactory("romanian", AnalyzerScope.INDICES, new RomanianAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("russian", new PreBuiltAnalyzerProviderFactory("russian", AnalyzerScope.INDICES, new RussianAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("spanish", new PreBuiltAnalyzerProviderFactory("spanish", AnalyzerScope.INDICES, new SpanishAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("swedish", new PreBuiltAnalyzerProviderFactory("swedish", AnalyzerScope.INDICES, new SwedishAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("turkish", new PreBuiltAnalyzerProviderFactory("turkish", AnalyzerScope.INDICES, new TurkishAnalyzer(Lucene.ANALYZER_VERSION)));
        analyzerProviderFactories.put("thai", new PreBuiltAnalyzerProviderFactory("thai", AnalyzerScope.INDICES, new ThaiAnalyzer(Lucene.ANALYZER_VERSION)));
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"))    
          analyzer= new FrenchAnalyzer();
        else if(language.equals("norwegian"))  
View Full Code Here

    private final RussianAnalyzer analyzer;

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

TOP

Related Classes of org.apache.lucene.analysis.ru.RussianAnalyzer

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.