i.e.
fields = []
index.search_each (query) do |doc, score|
fields += doc.all_fields
end
values = fields.collect { |f| f.string_value }
I don't really know what part of 'Ferret doing this' would be ... the information would have to be stored and retrieved from the index. Please elaborate if we do not seem to completely understand the problem.
On 6/16/06, Lee Marlow
<[EMAIL PROTECTED]> wrote:
Why would this only work for a small resultset? Are you looking for a
list of terms from the other field as tokenized by ferret or for just
the value you put in that field during indexing?
-Lee
On 6/16/06, Sergei Serdyuk <[EMAIL PROTECTED] > wrote:
> Hi Neville,
>
> It would work for a small resultset, but that is not an assumption I
> would want to make. I hope there is a way to get this info from Ferret
> directly.
>
> Sergei.
>
>
>
>
> Neville Burnell wrote:
> > How about something like this, where "field2" is the field you want to
> > collect
> >
> > values = []
> > index.search_each(query) do |doc, score|
> > values.push index[doc]["field2"]
> > end
>
>
> --
> Posted via http://www.ruby-forum.com/ .
> _______________________________________________
> Ferret-talk mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ferret-talk
>
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk
_______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

