lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <>
Subject QueryParser and NGrams
Date Thu, 11 Oct 2007 17:47:19 GMT
I don't understand, why does the following code create 2 phrase  
queries instead of 20 term queries? I'm quite sure I've previously  
had QueryParser doing the latter.

System.out.println(new QueryParser("f", new Analyzer() {
   public TokenStream tokenStream(String string, Reader reader) {
     return new NGramTokenFilter(new StandardTokenizer(reader), 2, 5);
}).parse("hello world"));

f:"he el ll lo hel ell llo hell ello hello" f:"wo or rl ld wor orl  
rld worl orld world"


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message