lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Hayen (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-2775) Sorting of search results can fail
Date Wed, 24 Nov 2010 20:24:17 GMT
Sorting of search results can fail
----------------------------------

                 Key: LUCENE-2775
                 URL: https://issues.apache.org/jira/browse/LUCENE-2775
             Project: Lucene - Java
          Issue Type: Bug
          Components: Search
    Affects Versions: 3.0.1
            Reporter: Kevin Hayen


When retrieving long values for sorting via the createValue method of the LongCache class
in FieldCacheImpl.java, there are cases where there are terms for a given field that are not
longs.  These values have no documents associated with them so they can be safely ignored.
 The problem is that if the value could not be parsed into a long, as was my case, then an
exception is thrown and the value 0 is returned for all documents.  This causes the sort to
fail.

In my case the offending value was "0-73080000".  I do not know how that got into the index
and as such, have no way of reproducing this bug.

The solution was to simply catch the exception and move on to the next term without bailing
out of the sort.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message