lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <karl.wet...@gmail.com>
Subject Re: QueryParser and NGrams
Date Thu, 11 Oct 2007 18:51:10 GMT
No, sorry, I'm still confused. It ought to be a term queries?

--  
the flooding troll


11 okt 2007 kl. 20.40 skrev Karl Wettin:

> I now realize that that phrase makes sense, and that it was another  
> "feature" in my code that confused me.
>
> So, forget about it.
>
> Bada bing, bada bom.
>
>
> -- 
> karl
>
> 11 okt 2007 kl. 19.47 skrev Karl Wettin:
>
>> 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"
>>
>>
>> -- 
>> karl
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message