Key-Value extraction methods

I’m going to be using Ferret in a database that is more object based
rather
than relational. Ferret will provide most of the necessary querying
capability for extracting objects out of the database.

But anyway, I was curious as to what methods the indexer uses to extract
key-value (or field-content) pairs out of the Document. I’ve seen
regular
Ruby Hash objects given as well as raw ActiveRecord objects. I see two
obvious ways to get the values - “keys” and “each do |key,value|”

The reason I ask is I’ll likely be giving the indexer some abstract
object
and I want to make sure I provide the interface it is expecting.

Thank you
John Aughey