我正在使用elasticsearch-model,我使用了关注方法,这是我的搜索方法。我已经通过curl尝试了我的查询,它返回了5个条目但是当我使用这种方法时
def search_index(*args)
self.__elasticsearch__.search(*args)
end
它给我上课
(byebug) Entry.search_index('test').records
#<Elasticsearch::Model::Response::Records:0x007f8eb85ca280 @klass=[PROXY] Entry(id: integer, created_at: datetime, updated_at: datetime, source_id: integer, data: text, uuid: string, source_entry_id: string, bytesize: integer), @response=#<Elasticsearch::Model::Response::Response:0x007f8eb85ca370 @klass=[PROXY] Entry(id: integer, created_at: datetime, updated_at: datetime, source_id: integer, data: text, uuid: string, source_entry_id: string, bytesize: integer), @search=#<Elasticsearch::Model::Searching::SearchRequest:0x007f8eb85ca438 @klass=[PROXY] Entry(id: integer, created_at: datetime, updated_at: datetime, source_id: integer, data: text, uuid: string, source_entry_id: string, bytesize: integer), @options={}, @definition={:index=>"self_driving_entries", :type=>"entry", :q=>"test"}>, @records=#<Elasticsearch::Model::Response::Records:0x007f8eb85ca280 ...>>, @options={}>
我怎样才能通过这种搜索方法访问我的记录?