lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boris Galitsky" <bg7...@rambler.ru>
Subject A problem running two or more negative Span clauses
Date Sat, 29 Apr 2006 03:21:53 GMT
Hello

  I am having problems running span queries with more than one 
negative clauses:

Is the span query nested correctly?

spanNear([spanOr([contents:10.1.1.95, contents:10.1.1.81]),
spanNot(spanNear([contents:translated], 5000, false), 
                                                  //positive part
                spanNear([contents:replace, contents:permit], 5000, 
false))], 10000, true)    //negative part

Number of hits: 7

Exception in thread "main" java.lang.NullPointerException
	at org.apache.lucene.search.spans.NearSpans.doc(NearSpans.java:227)
	at 
org.apache.lucene.search.spans.SpanNotQuery$1.next(SpanNotQuery.java:75)
	at 
org.apache.lucene.search.spans.NearSpans$SpansCell.next(NearSpans.java:86)
	at 
org.apache.lucene.search.spans.NearSpans.initList(NearSpans.java:241)
	at org.apache.lucene.search.spans.NearSpans.next(NearSpans.java:142)
	at org.apache.lucene.search.spans.SpanScorer.next(SpanScorer.java:50)
	at org.apache.lucene.search.Scorer.score(Scorer.java:47)
	at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:132)
	at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:99)
	at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:65)
	at org.apache.lucene.search.Hits.<init>(Hits.java:44)
	at org.apache.lucene.search.Searcher.search(Searcher.java:44)
	at org.apache.lucene.search.Searcher.search(Searcher.java:36)

Is the code required?
Thanks a lot
Boris

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message