Example usage for org.apache.lucene.analysis.miscellaneous ASCIIFoldingFilterFactory ASCIIFoldingFilterFactory

List of usage examples for org.apache.lucene.analysis.miscellaneous ASCIIFoldingFilterFactory ASCIIFoldingFilterFactory

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.miscellaneous ASCIIFoldingFilterFactory ASCIIFoldingFilterFactory.

Prototype

public ASCIIFoldingFilterFactory(Map<String, String> args) 

Source Link

Document

Creates a new ASCIIFoldingFilterFactory

Usage

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

License:Apache License

@Test
public void testNormalization() throws Exception {
    String fieldName = "f";
    TokenFilterFactory[] tff = new TokenFilterFactory[2];
    tff[0] = new LowerCaseFilterFactory(Collections.EMPTY_MAP);
    tff[1] = new ASCIIFoldingFilterFactory(Collections.EMPTY_MAP);
    TokenizerChain tokenizerChain = new TokenizerChain(new MockTokenizerFactory(Collections.EMPTY_MAP), tff);
    assertEquals(new BytesRef("fooba"), tokenizerChain.normalize(fieldName, "FOOB\u00c4"));
}