Skip to content

Search iterators are broken #1145

Closed
Closed
@bakurin

Description

@bakurin

Search iterators are broken

It seems that after #1044 SearchResponseIterator is broken: a deprecation error is thrown on an attempt to iterate the search result.

Code snippet of problem

$res = new SearchHitIterator(new SearchResponseIterator($client, $params));
foreach ($res as $hit) {
    //
}

System details

  • Operating System: Alpine Linux
  • PHP Version: 8.0
  • ES-PHP client version: 7.12
  • Elasticsearch version: 7.4

There is my PR #1134 with the suggested fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions