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

