How to search date with ferret and acts_as_ferret?

Hey all,

How can I search date with ferret? Do I need to submit them in a special
format?
Right now I have in my Item model:

acts_as_ferret :fields => [:created_on]

with eg created_on = Thu May 11 17:00:00 -0500 2006

now when I do Item.find_by_content(“created_on:<#{Time.now}”)

I get nil, I’m probably doing something wrong.

Any idea how to fix it?

thanx in advance

Pat

ok found it.

acts_as_ferret :fields => [:created_on => {:index =>
:untokenized_omit_norms, :term_vector => :no}]

def created_on
self.created_on.to_i
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs