lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Sorting date stored in milliseconds time
Date Thu, 07 Apr 2005 08:34:29 GMT


1) it would be additional logic overhead to generate the unique id and keep
it global for all data providers
2) I doubt that ordering on 2 fields like "time" up to sec (or even to min)
and "integer" will be quicker when sorting using just one "long"

                      Scott Farquhar                                                     
                      <scott@atlassian.        To:  
                      com>                     cc:       Lucene Users List <>,
(bcc: Iouli       
                      06.04.2005 23:51         Subject:  Re: Sorting date stored in milliseconds
                      Please respond to                                                  
                      java-user                Category:       |-------------------------|
                                                               | ( ) Action needed       |
                                                               | ( ) Decision needed     |
                                                               | ( ) General Information |

On Wed, Apr 06, 2005 at 01:02:35PM +0200,
> I'm  forced to keep date up to milisec. The reason is simple: I get at
> least a couple of new messages per sec, if all of them are stamped with
> same time, the retrieval order id undefined, i.e.  once I get it, let's
> say, as the last reference on the first page, other time - as the first
> on the second page. In case You do not keep the cache and always performs
> the same query even to get the second page it's getting even worse, i.e.
> displaying the messgaes 41-80, may bring the message 41, which You
> displayed on your first page as message 40.

Why can't you have a secondary sort on message id?  Then you sort by time
and message id will always result in consistent ordering.


Expert J2EE Software, Services and Support
JIRA Docs:

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

The Novartis email address format has changed to  Please update your address book 

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

View raw message