Re: [PyIndexer] Notes on Docs and Testing
Status: Pre-Alpha
Brought to you by:
cduncan
From: Marcus C. <ma...@wr...> - 2001-12-07 17:49:16
|
On Fri, 7 Dec 2001 at 15:57:45 +0000, Chris Withers wrote: [ DateTime handling ] > Casey Duncan wrote: > > > > We probably don't need a specific index type for dates and times (because > > they can be distilled down to floats), unless there is some date-specific > > search functionality that is needed (none comes to mind). > > Hmmm... maybe not at first, but indexing Dates and Times in this way feels very unnatural to me. > In addition, DateTime combined objects also feel pretty unnatural :-( Coming in late here (*wave* everyone!), so excuse me if I'm missing the mark... Couldn't using floats for the dates result in an accuracy problem, particularly if they're stored in a database which may have a default display width assigned to its column (as is the case with MySQL and probably most DBMS)? The database server returns the float as a string, the database API converts it back to a float, and you may end up with a different float to the one you had originally. Probably better to use a long int for handling dates and times, and if you end up doing and searching, the comparisons will be faster in any case. Any reason not to? Alternatively, map to the underlying storage's date / time types if that fits in with your architecture. [ snip index identifiers ] [ Big text files ] Maybe check out all the public domain works at Project Gutenberg? <URL:http://promo.net/pg/> and many FTP mirrors. There's a good few thousand books, etc., in text form. Easily a few hundred megs of text, I reckon. Cheers -- Marcus |