Package com.code972.elasticsearch.analysis

Examples of com.code972.elasticsearch.analysis.HebrewQueryLightAnalyzer


    private final HebrewExactAnalyzer analyzer;

    @Inject
    public HebrewExactAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) throws IOException {
        super(index, indexSettings, name, settings);
        analyzer = new HebrewExactAnalyzer();
    }
View Full Code Here


    private final HebrewIndexingAnalyzer analyzer;

    @Inject
    public HebrewIndexingAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) throws IOException {
        super(index, indexSettings, name, settings);
        analyzer = new HebrewIndexingAnalyzer();
    }
View Full Code Here

    private final HebrewQueryAnalyzer hebrewAnalyzer;

    @Inject
    public HebrewQueryAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) throws IOException {
        super(index, indexSettings, name, settings);
        hebrewAnalyzer = new HebrewQueryAnalyzer();
    }
View Full Code Here

    private final PerFieldAnalyzerWrapper perFieldAnalyzerWrapper;

    @Inject
    public HebrewQueryAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) throws IOException {
        super(index, indexSettings, name, settings);
        hebrewAnalyzer = new HebrewQueryAnalyzer();

        final Map<String, Analyzer> analyzerMap = Maps.newHashMap();
        analyzerMap.put("title", hebrewAnalyzer);
        analyzerMap.put("topic", hebrewAnalyzer);
        analyzerMap.put("parent_title", hebrewAnalyzer);
View Full Code Here

    private final HebrewQueryLightAnalyzer hebrewAnalyzer;

    @Inject
    public HebrewQueryLightAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) throws IOException {
        super(index, indexSettings, name, settings);
        hebrewAnalyzer = new HebrewQueryLightAnalyzer();
    }
View Full Code Here

        channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));
    }

    public static List<String> getLemmas(String word) throws IOException {
        List<String> ret = new ArrayList<>();
        Analyzer a = new HebrewQueryLightAnalyzer();
        TokenStream ts = a.tokenStream("foo", word);
        ts.reset();
        while (ts.incrementToken()) {
            CharTermAttribute cta = ts.getAttribute(CharTermAttribute.class);
            ret.add(new String(cta.buffer(), 0, cta.length()));
        }
        ts.close();
        a.close();
        return ret;
    }
View Full Code Here

        channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));
    }

    public static List<String> getLemmas(String word) throws IOException {
        List<String> ret = new ArrayList<>();
        Analyzer a = new HebrewQueryLightAnalyzer();
        TokenStream ts = a.tokenStream("foo", word);
        ts.reset();
        while (ts.incrementToken()) {
            CharTermAttribute cta = ts.getAttribute(CharTermAttribute.class);
            ret.add(new String(cta.buffer(), 0, cta.length()));
        }
        ts.close();
        a.close();
        return ret;
    }
View Full Code Here

            builder.startObject();
            builder.field("word", word);
            builder.field("wordType", wordType);
            if (wordType != HebrewAnalyzer.WordType.UNRECOGNIZED && wordType != HebrewAnalyzer.WordType.NON_HEBREW) {
                builder.startArray("lemmas");
                Analyzer a = new HebrewQueryLightAnalyzer();
                TokenStream ts = a.tokenStream("foo", word);
                while (ts.incrementToken()) {
                    CharTermAttribute cta = ts.getAttribute(CharTermAttribute.class);
                    builder.value(new String(cta.buffer(), 0, cta.length()));
                }
                a.close();
                builder.endArray();
            }
            builder.endObject();

            channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
View Full Code Here

    private final PerFieldAnalyzerWrapper perFieldAnalyzerWrapper;

    @Inject
    public HebrewQueryLightAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) throws IOException {
        super(index, indexSettings, name, settings);
        hebrewAnalyzer = new HebrewQueryLightAnalyzer();

        final Map<String, Analyzer> analyzerMap = Maps.newHashMap();
        analyzerMap.put("title", hebrewAnalyzer);
        analyzerMap.put("topic", hebrewAnalyzer);
        analyzerMap.put("parent_title", hebrewAnalyzer);
View Full Code Here

    private final HebrewQueryLightAnalyzer hebrewAnalyzer;

    @Inject
    public HebrewQueryLightAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) throws IOException {
        super(index, indexSettings, name, settings);
        hebrewAnalyzer = new HebrewQueryLightAnalyzer();
    }
View Full Code Here

TOP

Related Classes of com.code972.elasticsearch.analysis.HebrewQueryLightAnalyzer

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.