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: lucene Front-end match
Date Fri, 19 Sep 2008 09:39:02 GMT

19 sep 2008 kl. 11.05 skrev 叶双明:

> Document<stored/uncompressed,indexed<field:abc>>
> Document<stored/uncompressed,indexed<field:bcd>>
>
> How can I get the first Document buy some query string like "a" ,  
> "ab" or
> "abc" but no "b" and "bc"?

You would create an ngram filter that create grams from the first  
position only. Take a look at EdgeNGramTokenFilter in contrib/analyzers.


      karl



---------------------------------------------------------------------
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