We're working on duplicating this issue with a general and small
index. The index was built with a trunk version of Lucene.
I'll re-patch things soon and see how that goes.
Erik
On Jan 25, 2006, at 12:08 PM, Paul Elschot wrote:
On Wednesday 25 January 2006 12:14, Erik Hatcher wrote:
In using SpanQuery in a sophisticated way, we've experienced an issue
with NearSpans giving the following exception:
java.lang.RuntimeException: Unexpected: ordered
at
org.apache.lucene.search.spans.NearSpans.firstNonOrderedNextToPartial
Lis
t(NearSpans.java:291)
In all likelyhood this code is buggy, and I would prefer to use the
NearSpansOrdered things from the LUCENE-413 as you indicated.
at org.apache.lucene.search.spans.NearSpans.next
(NearSpans.java:183)
at org.apache.lucene.search.spans.SpanScorer.next
(SpanScorer.java:50)
at org.apache.lucene.search.BooleanScorer$SubScorer.<init>
(BooleanScorer.java:48)
at org.apache.lucene.search.BooleanScorer.add
(BooleanScorer.java:76)
at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer
(BooleanQuery.java:274)
at org.apache.lucene.search.IndexSearcher.search
(IndexSearcher.java:98)
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)
This is using the current trunk code. I believe this may be related
to http://issues.apache.org/jira/browse/LUCENE-413
Was the trunk code also used to create the index? I (very) vaguely
recall
seeing another message hinting (to me at least) that this might be
related
to building the index with an older version. I'll also have a look
through
my archives for this.
Unfortunately I cannot share the exact index or query, but the query
ends up being a BooleanQuery with about 10 clauses, some being simple
TermQuery's, and others being SpanNearQuery's nested with
SpanRegexQuery's and SpanTermQuery's.
Thoughts? Is this related to LUCENE-413? Shall I re-apply all those
patches (if they still work) and give it another try?
I would certainly like to get the NearSpans code correct, and I could
continue bug hunting as earlier. I would prefer to start from the
NearSpansOrdered/Unordered code as posted there because that
will at least get the "Unexpected: ordered" exception out of the way.
Regards,
Paul Elschot
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]