use of org.apache.lucene.analysis.MockBytesAnalyzer in project lucene-solr by apache.
the class TestQueryParser method testByteTerms.
// LUCENE-4176
public void testByteTerms() throws Exception {
String s = "เข";
Analyzer analyzer = new MockBytesAnalyzer();
QueryParser qp = new QueryParser(FIELD, analyzer);
assertTrue(isAHit(qp.parse("[เข TO เข]"), s, analyzer));
assertTrue(isAHit(qp.parse("เข~1"), s, analyzer));
assertTrue(isAHit(qp.parse("เข*"), s, analyzer));
assertTrue(isAHit(qp.parse("เ*"), s, analyzer));
assertTrue(isAHit(qp.parse("เ??"), s, analyzer));
}
Aggregations