Package org.apache.lucene.search.suggest.analyzing

Examples of org.apache.lucene.search.suggest.analyzing.AnalyzingSuggester.lookup()


    private Collection<String> getSuggestions(ShardSuggestRequest shardSuggestRequest) throws IOException {
        List<LookupResult> lookupResults = Lists.newArrayList();
        if ("full".equals(shardSuggestRequest.suggestType())) {
            AnalyzingSuggester analyzingSuggester = analyzingSuggesterCache.getUnchecked(new FieldType(shardSuggestRequest));
            lookupResults.addAll(analyzingSuggester.lookup(shardSuggestRequest.term(), false, shardSuggestRequest.size()));
        } else if ("fuzzy".equals(shardSuggestRequest.suggestType())) {
            lookupResults.addAll(fuzzySuggesterCache.getUnchecked(new FieldType(shardSuggestRequest))
                    .lookup(shardSuggestRequest.term(), false, shardSuggestRequest.size()));

        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.