Re: Using SpanRegexQuery to search year like 200?

2006-09-10 Thread Luke Tan
1.4.2/docs/api/java/util/regex/Pattern.html> "X? matches X, once or not at all" Use "200.?" perhaps, or more appropriately for matching any year 2000 - 2009 as "200\d". Erik On Sep 8, 2006, at 8:50 PM, Luke Tan wrote: > Hi, > > Can this be use

Re: Using SpanRegexQuery to search year like 200?

2006-09-10 Thread Luke Tan
er to search people:"born in 200?" Kind Regards, Luke On 9/9/06, Erick Erickson <[EMAIL PROTECTED]> wrote: I've got to ask Why not just use a RangeQuery? Seems to be just what you want without the complications. Best Erick On 9/8/06, Luke Tan <[EMAIL PROTECT

Using SpanRegexQuery to search year like 200?

2006-09-08 Thread Luke Tan
Hi, Can this be use to search year 2000, 2001, 2002, ... 2009? SpanFirstQuery snq = new SpanFirstQuery(new SpanRegexQuery(new Term("year", "200?")), 1); I need to use it to search something like Who is born in 200? Thanks

Re: SpanRegexQuery causes error

2006-09-08 Thread Luke Tan
I use analyzer with LowerCaseTokenizer only (No stop word or any other special treatment). The phrase is tokenized. On 9/9/06, Luke Tan I tried .* too but it gave the same error. I think it's a bug. I solve it using SpanTermQuery where the search phrase is broken into day of every months

Re: SpanRegexQuery causes error

2006-09-08 Thread Luke Tan
e: On Sep 7, 2006, at 9:26 PM, Luke Tan wrote: > spanFirst(spanRegexQuery(monthly:day * of every * months), 10) What analyzer did you use for your text? Again, that is not a valid regular expression. But also, you're using a single long string of several words within your SpanRege

Re: SpanRegexQuery causes error

2006-09-07 Thread Luke Tan
uot; or some other pattern. Erik On Sep 7, 2006, at 7:41 AM, Luke Tan wrote: > Hi, > > I am using code in > http://mail-archives.apache.org/mod_mbox/lucene-java-user/ > 200605.mbox/% > [EMAIL PROTECTED] > > for wildcard search in phrase > > but it seems that

SpanRegexQuery causes error

2006-09-07 Thread Luke Tan
Hi, I am using code in http://mail-archives.apache.org/mod_mbox/lucene-java-user/200605.mbox/[EMAIL PROTECTED] for wildcard search in phrase but it seems that I can only search something like: "one two three word*" but not "one * three word" It throws error: java.lang.NullPointerExceptio