app/models/concerns/indexable.rb
# don't raise an exception when not found
don't raise an exception when not found
don ' t raise an exception when not found
def find_by_ids(ids, options = {})
      options[:sort] ||= { "_doc" => { order: "asc" } }
      __elasticsearch__.search({
                                 from: options[:from] || 0,
                                 size: options[:size] || 25,
                                 sort: [options[:sort]],
                                 query: {
                                   ids: {
                                     values: ids.split(",").map(&:downcase),
                                   },
                                 },
                                 aggregations: query_aggregations,
                               })
    end
def find_by_ids ( ids , options = { } ) options [ :sort ] ||= { "_doc" => { order : "asc" } } __elasticsearch__ . search ( { from : options [ :from ] || 0 , size : options [ :size ] || 25 , sort : [ options [ :sort ] ] , query : { ids : { values : ids . split ( "," ) . map ( & :downcase ) , } , } , aggregations : query_aggregations , } ) end
don't raise an exception when not found
don ' t raise an exception when not found
ids
<not_specific>
options
<not_specific>