Closed ManyTheFish closed 1 year ago
I have recently worked on a similar way to merge multiple Sorter
together by doing a single operation. You can see the Sorter::into_reader_cursors
method in https://github.com/meilisearch/grenad/pull/41. It hasn't been released yet as I want more feedback before releasing a new Grenad version.
Today the easy way to merge several sorters is to use the method
write_into_stream_writer
to merge each sorter into a file, then, create a merger pushing each file into it. This means we have to make several merges in a row to merge several sorters.Proposal
1) Add a method
into_merger
in the structSorter
that creates aMerger
by consuming theSorter
2) Allow theMergerBuilder
to take in parameter one or severalMerger
s or allow unions betweenMerger
s.Basic usage