lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iouli.golova...@novartis.com
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                                                       
                                     
                      <morus.walter@tan        To:       "Lucene Users List" <lucene-user@jakarta.apache.org>,
Ben             
                      to.de>                    <newreaders@gmail.com>          
                                              
                                               cc:       (bcc: Iouli Golovatyi/X/GP/Novartis)
                                 
                      28.02.2005 08:47         Subject:  Re: Sorting date stored in milliseconds
time                          
                      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?

Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org







______________________________________________________________________
The Novartis email address format has changed to 
firstname.lastname@novartis.com.  Please update your address book 
accordingly.
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message