-
Notifications
You must be signed in to change notification settings - Fork 963
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
使用PHP GET方法,不能获取到文档内容 #1402
Comments
I'm sorry but we can provide support only in English. Can you translate your request? Thanks! |
Sorry, I have translated it into English |
@wangyongdong the Here you can find more information about the response object. The body content is stored inside the same object and you can take it as object property or using an array index interface. For instance, to get a document you can use the following code: $params = [
'index' => 'my_index',
'id' => 'my_id',
];
$response = $client->get($params);
var_dump($response['_source']); // get the document using array interface
var_dump($response->_source); // get the document as object property |
Thank you |
Using the PHP GET method, you cannot get the content of the documentation
Code, return information, configuration file
1、Create an index document
Return result:
2、Get the document:
Return result:
I can't see the content of the document in the return result. Use the
CURL -X GET" http://192.168.xxx.xxx:9200/my_index/_doc/my_id?pretty "
, the return results are as follows as follows:Why can you create documents through PHP and cannot get the content of the document?
/etc/elasticsearch/elasticsearch.yml
The content of the file is as follows:System details
The text was updated successfully, but these errors were encountered: