Elasticsearch got stack level too deep with google apis

Viewed 47

I've met a problem when using gem google api My Elasticsearch will get SystemStackError - stack level too deep. I am sure the issue comes up when every time I try to do an operation(calling method) to the object of Elasticsearch::Model::Response::Results

Structure

class Organization < ApplicationRecord
  include Searchable::Organization
end
module Searchable
  module Organization
    extend ActiveSupport::Concern
    
    module ClassMethods
      def es_search(term: nil)
        __elasticsearch__.search(
          query: {
            bool: {
              must: {
                multi_match: {
                  query: term
                }
              },
            }
          },
          size: size
        )
      end
    end
  end
end

Gem version

  • ruby (2.6.5)
  • rails (6.0.3.7)
  • elasticsearch-model(7.1.0)
  • elasticsearch-rails(7.1.0)
  • google-apis-core (0.4.2)
  • google-apis-drive_v3 (0.19.0)
  • google-apis-slides_v1 (0.12.0)

Thanks in advance.

0 Answers
Related