Forum: Ferret Ferret::Search::TypedRangeQuery

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.
Dur D. (Guest)
on 2008-12-29 21:52
I need to do typed range queries on record ids and dates. When I call
Ferret::Search::TypedRangeQuery I get the error:

NameError: uninitialized constant Ferret::Search::TypedRangeQuery

Is TypedRangeQuery supported in AAF? I am using Ferret gem 0.11.6 and
AAF 0.4.3. If its not supported, is there any other way of accomplishing
a typed range query? I tried using a RangeQuery and setting the
following in the model:

acts_as_ferret  :fields => { :id_sort => { :index => :untokenized },
:updated_at_sort => { :index => :untokenized }, ...}, :ferret => {
:use_typed_range_query => true }

...but this didn't work either. The search results indicate ferret is
treating the ids as strings. It seem to do the correct thing with date
ranges however.
Dur D. (Guest)
on 2008-12-31 21:21
Dur Dev wrote:
> I need to do typed range queries on record ids and dates. When I call
> Ferret::Search::TypedRangeQuery I get the error:
>
> NameError: uninitialized constant Ferret::Search::TypedRangeQuery
>
> Is TypedRangeQuery supported in AAF? I am using Ferret gem 0.11.6 and
> AAF 0.4.3. If its not supported, is there any other way of accomplishing
> a typed range query? I tried using a RangeQuery and setting the
> following in the model:
>
> acts_as_ferret  :fields => { :id_sort => { :index => :untokenized },
> :updated_at_sort => { :index => :untokenized }, ...}, :ferret => {
> :use_typed_range_query => true }
>
> ...but this didn't work either. The search results indicate ferret is
> treating the ids as strings. It seem to do the correct thing with date
> ranges however.

Looks like it's not supported in 0.11.6. It's in "current". Nice
feature, look forward to using it when it's released.
This topic is locked and can not be replied to.