David Balmain wrote:
> On 10/14/06, Andreas Schwarz <[EMAIL PROTECTED]> wrote:
>> Ferret 0.10.11 & AAF: the time seems to be stored in a format that can't
>> be sorted, the order doesn't make any sense. Workaround: use to_i on the
>> Time object before putting it into the index.
> 
> This is fine for sorting but it won't work when you want to do range
> queries. If you want to run range queries against the field you will
> need to pad the integer to a fixed width.

Thanks, I didn't think of that. The width of a unix timestamp isn't 
going to change for the next few years, though.

> I usually add dates in YYYYMMDD format so that they are also human
> readable.

I need at least seconds in this case.

> Another thing to take into account is the precision you
> want. The higher the precision you store the longer indexing and
> searching will take. For small indexes however the difference will be
> negligible.

Will this also affect :sort performance? I have another index with 450k 
documents that I also would like to sort by time, that's probably no 
longer a small index. Is the sorting capable of :sorting and :limiting a 
large numer of results (e.g. 100k), or is this something that should 
only be done with small result sets?

Andreas

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to