Class: Dap::Filter::FilterFieldSplitArray
- Inherits:
-
Object
- Object
- Dap::Filter::FilterFieldSplitArray
- Includes:
- Base
- Defined in:
- lib/dap/filter/simple.rb
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#process(doc) ⇒ Object
493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/dap/filter/simple.rb', line 493 def process(doc) self.opts.each_pair do |k,v| if doc.has_key?(k) and doc[k].respond_to?(:each) wcount = 1 doc[k].each do |word| doc.merge!({ "#{k}.f#{wcount}" => word }) wcount += 1 end end end [ doc ] end |