def OPTIMIZE(writer, segments):
    """This policy merges all existing segments.
    """
    from cylleneus.engine.reading import SegmentReader
    for seg in segments:
        reader = SegmentReader(writer.storage, writer.schema, seg)
        writer.add_reader(reader)
        reader.close()
    return []
