Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

创建文档时候抛出错误 #7

Open
729343861 opened this issue Apr 17, 2020 · 0 comments
Open

创建文档时候抛出错误 #7

729343861 opened this issue Apr 17, 2020 · 0 comments

Comments

@729343861
Copy link

vendor\easyswoole\elasticsearch\src\Endpoints\Create.php

代码段
public function getURI(): string
{
if (isset($this->id) !== true) {
throw new RuntimeException(
'id is required for create'
);
}
$id = $this->id;
if (isset($this->index) !== true) {
throw new RuntimeException(
'index is required for create'
);
}
$index = $this->index;
var_dump($this->type);
$type = $this->type ?? null;
if (isset($type)) { //这里的判断是不是有问题?不建议url传送类型,那么这个扩展包还有其他的方法吗?
@trigger_error('Specifying types in urls has been deprecated', E_USER_DEPRECATED);
}

    if (isset($type)) {  
        return "/$index/$type/$id/_create";
    }
    return "/$index/_create/$id";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant