lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: SpanRegexQuery causes error
Date Fri, 08 Sep 2006 14:33:31 GMT

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message