def remove(*objects, &block)
      if block
        types = objects
        conjunction = Query::Connective::Conjunction.new
        if types.length == 1
          conjunction.add_positive_restriction(TypeField.instance, Query::Restriction::EqualTo, types.first)
        else
          conjunction.add_positive_restriction(TypeField.instance, Query::Restriction::AnyOf, types)
        end
        dsl = DSL::Scope.new(conjunction, setup_for_types(types))
        Util.instance_eval_or_call(dsl, &block)
        indexer.remove_by_scope(conjunction)
      else
        objects.flatten!
        @deletes += objects.length
        objects.each do |object|
          indexer.remove(object)
        end
      end
    end
def remove(*objects, &block)
      if block
        types = objects
        conjunction = Query::Connective::Conjunction.new
        if types.length == 1
          conjunction.add_positive_restriction(TypeField.instance, Query::Restriction::EqualTo, types.first)
        else
          conjunction.add_positive_restriction(TypeField.instance, Query::Restriction::AnyOf, types)
        end
        dsl = DSL::Scope.new(conjunction, setup_for_types(types))
        Util.instance_eval_or_call(dsl, &block)
        indexer.remove_by_scope(conjunction)
      else
        objects.flatten!
        @deletes += objects.length
        objects.each do |object|
          indexer.remove(object)
        end
      end
    end
See Sunspot.remove