While I don't completely understand all contstraints, it seems as though a generalized version of Neville's solution that goes through all fields in the document would work just fine. <br><br>i.e.<br>fields = []<br>index.search_each
(query) do |doc, score|<br> fields += doc.all_fields<br>end<br>values = fields.collect { |f| f.string_value }<br><br>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.<br><br><div><span class="gmail_quote">On 6/16/06, <b class="gmail_sendername">Lee Marlow
</b> <<a href="mailto:lmarlow@yahoo.com">lmarlow@yahoo.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Why would this only work for a small resultset? Are you looking for a
<br>list of terms from the other field as tokenized by ferret or for just<br>the value you put in that field during indexing?<br><br>-Lee<br><br>On 6/16/06, Sergei Serdyuk <<a href="mailto:sergei@redleafsoft.com">sergei@redleafsoft.com
</a>> wrote:<br>> Hi Neville,<br>><br>> It would work for a small resultset, but that is not an assumption I<br>> would want to make. I hope there is a way to get this info from Ferret<br>> directly.<br>
><br>> Sergei.<br>><br>><br>><br>><br>> Neville Burnell wrote:<br>> > How about something like this, where "field2" is the field you want to<br>> > collect<br>> ><br>> > values = []
<br>> > index.search_each(query) do |doc, score|<br>> > values.push index[doc]["field2"]<br>> > end<br>><br>><br>> --<br>> Posted via <a href="http://www.ruby-forum.com/">http://www.ruby-forum.com/
</a>.<br>> _______________________________________________<br>> Ferret-talk mailing list<br>> <a href="mailto:Ferret-talk@rubyforge.org">Ferret-talk@rubyforge.org</a><br>> <a href="http://rubyforge.org/mailman/listinfo/ferret-talk">
http://rubyforge.org/mailman/listinfo/ferret-talk</a><br>><br>_______________________________________________<br>Ferret-talk mailing list<br><a href="mailto:Ferret-talk@rubyforge.org">Ferret-talk@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/ferret-talk">
http://rubyforge.org/mailman/listinfo/ferret-talk</a><br></blockquote></div><br>