lib/picky/internals/indexers/serial.rb in picky-2.2.0 vs lib/picky/internals/indexers/serial.rb in picky-2.2.1

- old
+ new

@@ -4,12 +4,10 @@ # Uses a category to index its data. # # Note: It is called serial since it indexes each # - # FIXME Giving the serial a category would be enough, since it already contains an index! - # class Serial < Base attr_reader :category delegate :source, :to => :category @@ -22,25 +20,16 @@ # def tokenizer @tokenizer ||= category.tokenizer end + # Harvest the data from the source, tokenize, + # and write to an intermediate "prepared index" file. + # def process comma = ?, newline = ?\n - # TODO Move open to config? - # - # @category.prepared_index do |file| - # source.harvest(@index, @category) do |indexed_id, text| - # tokenizer.tokenize(text).each do |token_text| - # next unless token_text - # file.buffer indexed_id << comma << token_text << newline - # end - # file.write_maybe - # end - # end - # local_tokenizer = tokenizer category.prepared_index_file do |file| result = [] source.harvest(category) do |indexed_id, text| local_tokenizer.tokenize(text).each do |token_text| \ No newline at end of file