Jan Prill wrote:
> http://ferret.davebalmain.com/api/classes/Ferret/QueryParser.html
>
> Have you had a look at the api? Here's an excerpt from the above uri
> regarding range queries. Sorting of date-fields has been subject of
> discussion as well: http://www.ruby-forum.com/topic/84502
> Cheers,
> Jan
>
yep, yesterday i looked it but it didn't work...anyway today i tried
another time and now works, maybe the problem was another, btw, about
date is ok, but there still are another problem, i've a string field
which is empty or with a comment, how can i select all which has this
comment null? i've tryed "comment:", "comment:''", "comment: "
"comment:null", "comment:nil", "comment:=null", "comment:=nil", but
nothing :(
i've found a workaround like this:
acts_as_ferret :fields => [:com
def com
self.comment == '' ? '0' : self.comment
end
def self.full_text_search(query)
return nil if query.nil? or (query == '')
query = "com:0"
Model.find_by_contents(query, {:limit => :all})
end
what do you think?
just the last question... i've a model which has a has_many
relationship, and i saw that when ferret retrieve the results does a
query like this:
SELECT * FROM something WHERE (something.id in
('33','22','6','11','23','12','24','13','8','25','14','9','26','15','27','16','28','17','29','31','20','19','21','32','10'))
is it possible to do a join with another table to get also the
information of the relationship? because in the result list i've to show
also that informations, and with a join i'd have n query less :)
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk