module Scrivito module Backend module PathIndex extend Backend::BaseIndex def self.id "path" end def self.query(keys) [{ field: '_path', operator: :equals, value: keys }] end def self.extract_update_value_from_data(data) data["_path"] end def self.group_by_multiple(paths, obj_datas) paths.map do |path| obj_datas.select { |obj_data| obj_data.value_of("_path") == path } end end end end end