ankane/searchkick · error · Searchkick::Error

Partial reindex not supported with queue option

Error message

Partial reindex not supported with queue option

What it means

Error "Partial reindex not supported with queue option" thrown in ankane/searchkick.

Source

Thrown at lib/searchkick/record_indexer.rb:58

            record.class.name,
            record.id.to_s,
            method_name ? method_name.to_s : nil,
            routing: routing,
            index_name: index.name,
            **extra_options
          )
        else
          Searchkick::BulkReindexJob.set(**job_options).perform_later(
            class_name: records.first.class.searchkick_options[:class_name],
            record_ids: records.map { |r| r.id.to_s },
            index_name: index.name,
            method_name: method_name ? method_name.to_s : nil,
            **extra_options
          )
        end
      when :queue
        if method_name
          raise Error, "Partial reindex not supported with queue option"
        end

        index.reindex_queue.push_records(records)
      when true, :inline
        index_records, other_records = records.partition { |r| index_record?(r) }
        import_inline(index_records, !full ? other_records : [], method_name: method_name, ignore_missing: ignore_missing, single: single)
      else
        raise ArgumentError, "Invalid value for mode"
      end

      # return true like model and relation reindex for now
      true
    end

    def reindex_items(klass, items, method_name:, ignore_missing:, single: false)
      routing = items.to_h { |r| [r[:id], r[:routing]] }
      record_ids = routing.keys

View on GitHub (pinned to 93e901a75b)

When it happens

Trigger: Thrown at lib/searchkick/record_indexer.rb:58 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ankane/searchkick@93e901a75b (2026-08-21). Data as JSON: /api/errors/1a8504a764980e87. Report an issue: GitHub.