dorelal
1
acts_as_ferret :fields => {
:name => {:},
:desc => {},
:start_date => {}
}
def start_date
self.start_datetime.strftime("%Y%m%d")
end
Now that I am strong start_date in YYYYMMDD format, I want to search for
all event in between 20070506 and 20070809
What will my query look like when I am using aaf. This one doesn’t work
Event.find_id_by_contents("start_date:[20070506 20070809])
I know how it works with native Ferret but can’t seem to integrate with
aaf.
dorelal
2
For what it’s worth, a similar query works for me:
Article.find_by_contents(“published_on:[2007-06-04 2007-09-14]”)
My published_on field is a DATE in the database, and I don’t convert
it at all. I’m using Ferret 0.11.4 and the latest aaf from the svn
trunk.
Hope that helps,
Doug
dorelal
3
Doug: You are right. For some mysterious reason I wasn’t getting the
result. It’s all good now.
Thanks.
Doug S. wrote:
For what it’s worth, a similar query works for me:
Article.find_by_contents(“published_on:[2007-06-04 2007-09-14]”)
My published_on field is a DATE in the database, and I don’t convert
it at all. I’m using Ferret 0.11.4 and the latest aaf from the svn
trunk.
Hope that helps,
Doug