lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl wettin <ka...@snigel.net>
Subject NearSpan
Date Tue, 18 Apr 2006 15:48:17 GMT
I don't understand what it means when this exception is thrown. I'm  
quite certain that it is my skipTo(target)-code that causes it , but  
I don't understand why. The FIXME and error message makes me think it  
might be that I deliver the data ordered and it was not expected to be?

private boolean firstNonOrderedNextToPartialList() throws IOException {
     /* Creates a partial list consisting of first non ordered and  
earlier.
      * Returns first non ordered .next().
      */
     last = first = null;
     int orderedIndex = 0;
     while (queue.top() != null) {
       SpansCell cell = (SpansCell)queue.pop();
       addToList(cell);
       if (cell.index == orderedIndex) {
         orderedIndex++;
       } else {
         return cell.next();
         // FIXME: continue here, rename to eg. checkOrderedMatch():
         // when checkSlop() and not ordered, repeat cell.next().
         // when checkSlop() and ordered, add to list and repeat  
queue.pop()
         // without checkSlop(): no match, rebuild the queue from the  
partial list.
         // When queue is empty and checkSlop() and ordered there is  
a match.
       }
     }
     throw new RuntimeException("Unexpected: ordered");
   }

---------------------------------------------------------------------
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