code: public static function search($query = [])
      {
          if ($query instanceof QueryBuilder) {
              $query = $query->build();
          }
          $model = static::createInstance();
          return $model->_dal->search($query);
      }
docs: Execute the query and get the result.
  
  @param QueryBuilder|array $query
  @return ElasticsearchCollection|static[]