546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
|
# File 'lib/droonga/searcher.rb', line 546
def format(output_target_attributes, records, output_limit, output_offset)
if output_offset >= records.size
output_offset = output_limit = 0
end
cursor_options = {
:offset => output_offset,
:limit => output_limit,
}
formatted_records = nil
records.open_cursor(cursor_options) do |cursor|
formatted_records = cursor.collect do |record|
format_record(output_target_attributes, record)
end
end
formatted_records
end
|