[email protected]
[Top] [All Lists]

[jira] Commented: (LUCENE-374) You cannot sort on fields that don't exis

Subject: [jira] Commented: (LUCENE-374) You cannot sort on fields that don't exist
From: "Yonik Seeley (JIRA)"
Date: Thu, 10 Nov 2005 03:46:03 +0100 CET
http://issues.apache.org/jira/browse/LUCENE-374?page=comments#action_12357177 ] 

Yonik Seeley commented on LUCENE-374:

I cloned this bug to LUCENE-459 to capture the desire for warnings in certain 
I don't think those concerns should hold up this patch, which fixes clearly 
inconsistent behavior.  If anyone still has concerns with this patch, speak up 
before it get's committed.

> You cannot sort on fields that don't exist
> ------------------------------------------
>          Key: LUCENE-374
>          URL: http://issues.apache.org/jira/browse/LUCENE-374
>      Project: Lucene - Java
>         Type: Bug
>   Components: Search
>     Versions: CVS Nightly - Specify date in submission
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Daniel Naber
>     Assignee: Lucene Developers
>  Attachments: sort.diff, sort.diff, sort.diff
> 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.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • [jira] Commented: (LUCENE-374) You cannot sort on fields that don't exist, Yonik Seeley (JIRA) <=