lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: Unexpected: ordered
Date Sun, 03 Jul 2005 14:39:05 GMT
On Sunday 03 July 2005 15:27, Dave Kor wrote:
> I have a system that automatically generate span queries to Lucene. 
> the system generates a query like this one which always throws a
> RuntimeException:
> spanNear([spanNear([text:interesting], 3, true), spanNear([text:interesting,
> text:john, text:said], 8, true)], 2, true)
> Basically, the system is looking for a document that contains a string 
> "interesting .... interesting john said". The thrown exception is as 
> java.lang.RuntimeException: Unexpected: ordered
>         at
> Source)
>         at Source)
>         at Source)
>         at Source)
>         at Source)
> My question is, what does is this "Unexpected: ordered" mean? and is there
> anyway I can avoid these exceptions?

It's an internal error that is not supposed to occur.
Could you continue on the java-dev list?

SpanNearQuery is not supposed to operate on a single argument, at least
that's what I thought when I wrote the bug fix code that throws this
exception. Does the exception go away when you replace the first spanNear
(the one with the single [text:interesting]  with a SpanTermQuery ?

It's also possible that the code cannot handle the two identical
text:interesting arguments. 

It's probably good to have a test case for this. Could you extend the
exception with the document number and maybe a position within the
document to try and get to the original text that causes this exception,
and use that to file a bug report?

Paul Elschot

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message