List of usage examples for org.apache.lucene.index SingleTermsEnum SingleTermsEnum
public SingleTermsEnum(TermsEnum tenum, BytesRef termText)
SingleTermsEnum. From source file:com.sindicetech.siren.search.node.NodeFuzzyQuery.java
License:Open Source License
@Override protected TermsEnum getTermsEnum(final Terms terms, final AttributeSource atts) throws IOException { if (maxEdits == 0 || prefixLength >= term.text().length()) { // can only match if it's exact return new SingleTermsEnum(terms.iterator(null), term.bytes()); }// w w w . j a v a 2 s .co m return new FuzzyTermsEnum(terms, atts, this.getTerm(), maxEdits, prefixLength, transpositions); }