org.apache.lucene.analysis.miscellaneous.LengthFilter.LengthFilter C# (CSharp) Method

LengthFilter() public method

Create a new LengthFilter. This will filter out tokens whose CharTermAttribute is either too short (CharTermAttribute#length() < min) or too long (CharTermAttribute#length() > max).
public LengthFilter ( System.Version version, TokenStream @in, int min, int max ) : System
version System.Version the Lucene match version
@in TokenStream
min int the minimum length
max int the maximum length
return System
	  public LengthFilter(Version version, TokenStream @in, int min, int max) : base(version, @in)
	  {
		if (min < 0)
		{
		  throw new System.ArgumentException("minimum length must be greater than or equal to zero");
		}
		if (min > max)
		{
		  throw new System.ArgumentException("maximum length must not be greater than minimum length");
		}
		this.min = min;
		this.max = max;
	  }

Same methods

LengthFilter::LengthFilter ( System.Version version, bool enablePositionIncrements, TokenStream @in, int min, int max ) : System