Example usage for org.apache.lucene.analysis.shingle ShingleFilter setOutputUnigramsIfNoShingles

List of usage examples for org.apache.lucene.analysis.shingle ShingleFilter setOutputUnigramsIfNoShingles

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.shingle ShingleFilter setOutputUnigramsIfNoShingles.

Prototype

public void setOutputUnigramsIfNoShingles(boolean outputUnigramsIfNoShingles) 

Source Link

Document

Shall we override the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)?

Usage

From source file:org.apache.solr.analysis.ShingleFilterFactory.java

License:Apache License

public ShingleFilter create(TokenStream input) {
    ShingleFilter r = new ShingleFilter(input, minShingleSize, maxShingleSize);
    r.setOutputUnigrams(outputUnigrams);
    r.setOutputUnigramsIfNoShingles(outputUnigramsIfNoShingles);
    r.setTokenSeparator(tokenSeparator);
    return r;//from  w w w  . j  av  a2 s  .c o m
}