Re: lucene Front-end match

2008-09-21 Thread 叶双明
Thanks Matthew Hall for two helpfull response! I have used Luke, but hasn't use this power, thanks. I want to parser something like: "a b*". I think I have to use WildcardQuery and BooleanQuery. 2008/9/19 Matthew Hall <[EMAIL PROTECTED]> > To be more specific (just in case you are new to lucene

Re: lucene Front-end match

2008-09-19 Thread Matthew Hall
To be more specific (just in case you are new to lucene) Your Query: Query query = qp.parse("bbb:\"b*\" AND ccc:\"cc*\""); What I think you actually want here: Query query = qp.parse("bbb:b* AND ccc:cc*"); Give it a shot, and then like I said, go get Luke, it will help you tremendously ^^

Re: lucene Front-end match

2008-09-19 Thread Matthew Hall
The reason the wildcard is being dropped is because you have wrapped it in a phrase query. Wildcards are not supported in Pharse Queries. At least not in any Analyzers that I'm aware of. A really good tool to see the transformations that happen to a query is Luke, open it up against your ind

Re: lucene Front-end match

2008-09-19 Thread 叶双明
I am sorry, just put the string to QueryParser. But what make me confusing the code: Query query = qp.parse("bbb:\"b*\" AND ccc:\"cc*\""); doesn't work as i have expected. It drop the Wildcard *. 2008/9/19, 叶双明 <[EMAIL PROTECTED]>: > > Thanks! > > Now, I just use Query query = qp.parse("a*"); a

Re: lucene Front-end match

2008-09-19 Thread 叶双明
Thanks! Now, I just use Query query = qp.parse("a*"); and meet the my requirements. Another question: how to parser query string like: title:"The Right Way" AND text:go please show me in java code. thanks. 2008/9/19 Karl Wettin <[EMAIL PROTECTED]> > > 19 sep 2008 kl. 11.05 skrev 叶双明:

Re: lucene Front-end match

2008-09-19 Thread Karl Wettin
19 sep 2008 kl. 11.05 skrev 叶双明: Document> Document> 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/analy