Example usage for org.apache.lucene.search.suggest.fst FSTCompletionLookup FSTCompletionLookup

List of usage examples for org.apache.lucene.search.suggest.fst FSTCompletionLookup FSTCompletionLookup

Introduction

In this page you can find the example usage for org.apache.lucene.search.suggest.fst FSTCompletionLookup FSTCompletionLookup.

Prototype

public FSTCompletionLookup(Directory tempDir, String tempFileNamePrefix) 

Source Link

Document

This constructor prepares for creating a suggested FST using the #build(InputIterator) method.

Usage

From source file:org.apache.solr.spelling.suggest.fst.FSTLookupFactory.java

License:Apache License

@Override
public Lookup create(NamedList params, SolrCore core) {
    int buckets = params.get(WEIGHT_BUCKETS) != null ? Integer.parseInt(params.get(WEIGHT_BUCKETS).toString())
            : 10;//w  w w  . ja  v  a2s. co m

    boolean exactMatchFirst = params.get(EXACT_MATCH_FIRST) != null
            ? Boolean.valueOf(params.get(EXACT_MATCH_FIRST).toString())
            : true;

    return new FSTCompletionLookup(buckets, exactMatchFirst);
}