数据存储在elasticsearch中,但从kibana访问时不显示
我使用 Django 作为后端,Postgres 数据库和 Angular JS 作为前端。当我们从前端注册时,数据存储在 Elasticsearch 中。它存储在 Elasticsearch 中,因为计数显示了所有注册数据,但当我使用以下命令在 Kibana 中搜索时,它没有显示:
GET candidate/_search
Kibana 中的输出:
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 16,
"max_score" : 1.0,
"hits" : [
{
"_index" : "candidate",
"_type" : "doc",
"_id" : "705",
"_score" : 1.0,
"_source" : {
"id" : 705,
"user" : {
"id" : 7005,
"first_name" : "brain",
"last_name" : "martine",
"email" : "[email protected]",
"employer_nm" : "A-1 hospitality",
"property_owner" : "25hours Hotel Company"
},
这里,总计数为 16,但它只显示我通过 Postman 添加的 10 条之前的数据。
I am using Django as a backend with Postgres database and Angular JS as a frontend. When we signup from frontend then the data stored in Elasticsearch. It is stored in Elasticsearch because counts show all signup data but it is not shown when I search in Kibana by using this command:
GET candidate/_search
Output in Kibana:
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 16,
"max_score" : 1.0,
"hits" : [
{
"_index" : "candidate",
"_type" : "doc",
"_id" : "705",
"_score" : 1.0,
"_source" : {
"id" : 705,
"user" : {
"id" : 7005,
"first_name" : "brain",
"last_name" : "martine",
"email" : "[email protected]",
"employer_nm" : "A-1 hospitality",
"property_owner" : "25hours Hotel Company"
},
Here, the total count is 16, but it only shows 10 previous data which I added through Postman.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Elasticsearch 默认只获取前 10 个结果,您可以使用
size
参数来获取更多文档。下面的示例将从您的索引中获取 100 个文档,因为当前有 16 个文档,因此它将获取 16 个。有关 Elasticsearch 文档
Elasticsearch by default fetch only the top 10 results, you can use
size
param to get more documents. Below example would fetch 100 documents from your index, as there are currently 16, Hence it would fetch 16.More info on Elasticsearch documentation