Example

public TokenStream tokenStream(String fieldName, Reader reader) { TokenStream result = new WhitespaceTokenizer(reader); result = new LowerCaseFilter(result); result = new StopFilter(result, stopWords); result = new SnowballFilter(result, "Italian");returnresult; }}

for (size = 1; size < M; size
*= b) {if (there are b indexes with size
docs on top of the stack) {pop them off the stack;merge them into a single index;push the merged index onto the
stack;} else { break; }}