lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "steve neo (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-1631) CLONE -You cannot sort on fields that don't exist
Date Fri, 08 May 2009 15:19:47 GMT
CLONE -You cannot sort on fields that don't exist
-------------------------------------------------

                 Key: LUCENE-1631
                 URL: https://issues.apache.org/jira/browse/LUCENE-1631
             Project: Lucene - Java
          Issue Type: Bug
          Components: Search
         Environment: Operating System: other
Platform: Other
            Reporter: steve neo
            Assignee: Yonik Seeley
             Fix For: 1.9


While it's possible to search for fields that don't exist (you'll get 0 hits),  
you'll get an exception if you try to sort by a field that has no values. The  
exception is this:  
  
if (termEnum.term() == null) {  
  throw new RuntimeException ("no terms in field " + field);  
}  
  
I'll attach a change suggested by Yonik Seeley that removes this exception. 
 
Also, the if-condition above is incomplete anyway, so currently the exception 
is not always thrown (as termEnum .term() might well be != null but point to a 
term in a different field already)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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