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 Wed, 06 Apr 2005 11:02:35 GMT

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 the
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 one
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 already
displayed on your first page as message 40.

                      Morus Walter                                                       
                      <        To:       "Lucene Users List" <>,
            >                    <>          
                                               cc:       (bcc: Iouli Golovatyi/X/GP/Novartis)
                      28.02.2005 08:47         Subject:  Re: Sorting date stored in milliseconds
                      Please respond to                                                  
                      "Lucene Users            Category:       |-------------------------|
                      List"                                    | ( ) Action needed       |
                                                               | ( ) Decision needed     |
                                                               | ( ) General Information |

Ben writes:
> I store my date in milliseconds, how can I do a sort on it? SortField
> has INT, FLOAT and STRING. Do I need to create a new sort class, to
> sort the long value?
Why do you need that precicion?
Remember: there's a price to pay. The memory required for sorting and
the time to set up the sort cache depends on the number of different terms,
dates in your case.
I can hardly think of an application where seconds are relevant, what do
you need milliseconds for?


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