Hi,
Thank you for the clue.
Ok, like a virtual attribute. Works technically but:
Downside: How often is that called ? Our tree has e.g. 200 children.
This means that the children are collected on every change of one of
the children (index) or?
Any other ideas?
Regards
Till
Am 20.11.2007 um 13:52 schrieb Chris Strom:
On Tue, Nov 20, 2007 at 01:17:30PM +0100, Till Vollmer wrote:
Hi,
Following problem:
We have a tree structure with children and a root element
(recursivly)
stored in one table (imagine a threaded forum).
Each of the children has a title which should be indexed by ferret.
Now we want to make a search that returns only the root and
searches all
items.
So if one node has "expensive" and nother node has "car" I want to
enter
"expensive car" in search and still find the root of all children
(and
only once!)
Also paging should work as well.
Any clues how to achieve that?
An instance method in the root class to the effect of
children_titles_with_spaces would get you this. That method would
return
"expensive car" given your simple, two-node example, which would be
indexable with the normal analyzer.
-Chris
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk
Codemart GmbH
Till Vollmer
Managing Director
Tel: +49 (0)89 1213 5359
Mob: + 49 (0)160 718 7403
Fax: +49 (0)89 1892 1347
Yahoo ID: till_vollmer
Skype: till_vollmer
www.codemart.de
[EMAIL PROTECTED]
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk