Forum: Ferret How to use fixnum in RangeQuery?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sinnyn L. (Guest)
on 2007-07-18 11:36
As far as i know about the RangeQuery is that it need fixed-length
number in query options such as RangeQuery.new(:count, :>= => '00', :<=
=> '99').
But is there a mechanism to use a fixnum in the options instead of
filling the left with 0?
Regards.
Jens K. (Guest)
on 2007-07-18 12:34
(Received via mailing list)
Hi!

On Wed, Jul 18, 2007 at 09:36:32AM +0200, Sinnyn Lee wrote:
> As far as i know about the RangeQuery is that it need fixed-length
> number in query options such as RangeQuery.new(:count, :>= => '00', :<=
> => '99').
> But is there a mechanism to use a fixnum in the options instead of
> filling the left with 0?

No, you have to use strings. You could write a wrapper around RangeQuery
that accepts Fixnums and does the left padding to the width of your
largest field value of course.

cheers,
Jens


--
Jens Krämer
http://www.jkraemer.net/ - Blog
http://www.omdb.org/     - The new free film database
This topic is locked and can not be replied to.