Closed ghost closed 12 years ago
Is it possible to create secondary indexes on dynamically defined attributes?
For example, something like this?
CSV.table('data.csv', csv_options).each do |row| doc = Data.new row.to_hash.each do |k, v| doc[k] = v end doc.index :property, String doc.save end
This doesn't seem to work. I had to declare a property on the document and declare it as an index.
Is it possible to create secondary indexes on dynamically defined attributes?
For example, something like this?