Discussion:
SortField via Drb
John Leach
2008-09-10 13:43:20 UTC
Permalink
Hi,

we need to use an SortField object so we can specify the column type:

sf_title = SortField.new(:title, :type => :string)

Except SortField objects don't appear to be marshalled properly across
DRb.

Luckily you can specify the sort field and reverse option as free form
text to the query, but you apparently can't specify the type.

Possible solutions:

* Maybe you can specify the type. Does anyone know how?

* Maybe SortField can be made to marshall. Does anyone know how, or
where best to start adding this if necessary?

* Maybe we can add this support to Ferret. Doesn't anyone have any
clues where to start? We don't mind doing some C coding :)

Thanks in advance!

John.
--
http://johnleach.co.uk
Jens Krämer
2008-09-10 14:07:30 UTC
Permalink
Hi!

Do you use aaf? In this case it should work (tm), since aaf has
support for this built in, see

http://projects.jkraemer.net/acts_as_ferret/browser/trunk/plugin/acts_as_ferret/lib/ferret_extensions.rb

If not, feel free to take the marshalling code to monkey patch your
Ferret - no C coding necessary ;)

Cheers,
Jens
Post by John Leach
Hi,
sf_title = SortField.new(:title, :type => :string)
Except SortField objects don't appear to be marshalled properly across
DRb.
Luckily you can specify the sort field and reverse option as free form
text to the query, but you apparently can't specify the type.
* Maybe you can specify the type. Does anyone know how?
* Maybe SortField can be made to marshall. Does anyone know how, or
where best to start adding this if necessary?
* Maybe we can add this support to Ferret. Doesn't anyone have any
clues where to start? We don't mind doing some C coding :)
Thanks in advance!
John.
--
http://johnleach.co.uk
_______________________________________________
Ferret-talk mailing list
http://rubyforge.org/mailman/listinfo/ferret-talk
--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49351467660 | Telefax +493514676666
kraemer-jv+***@public.gmane.org | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold
John Leach
2008-09-10 15:34:51 UTC
Permalink
Post by Jens Krämer
Hi!
Do you use aaf? In this case it should work (tm), since aaf has
support for this built in
We certainly do use aaf. I'll take a look why this isn't working for
us.

Thanks Jens, you're awesome as always :)

John.
--
http://johnleach.co.uk
Loading...