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 and I nest these SpanTermQuery into SpanNearQuery with slop > 1. Thanks. On 9/9/06, Erik Hatcher <[EMAIL PROTECTED]> wrote:
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 SpanRegexQuery term. What you probably want is a SpanNearQuery of those fixed terms along with a ".*" SpanRegexQuery in the wildcarded spots, and then you could nest that inside a SpaneFirstQuery. > java.lang.NullPointerException > java.lang.NullPointerException > at java.util.Hashtable.get(Hashtable.java:336) > at org.apache.lucene.index.MultiReader.norms(MultiReader.java:163) > at org.apache.lucene.search.spans.SpanWeight.scorer > (SpanWeight.java:70) > at org.apache.lucene.search.IndexSearcher.search > (IndexSearcher.java:129) > at org.apache.lucene.search.IndexSearcher.search > (IndexSearcher.java:110) > at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:65) > at org.apache.lucene.search.Hits.<init>(Hits.java:52) > at org.apache.lucene.search.Searcher.search(Searcher.java:53) It's likely a bug that you get this particular error, but I think you'll get around it by solving the above mentioned issues with your query. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]