No Data Inserted Into ElasticSearch with Olivere Golang












0















I have changed my code so that it uses olivere package when inserting data into elastic search. This is the code



 // Get a snapshot of stats (always blank if not enabled--see above)
stats := p.Stats()

fmt.Printf("Number of times flush has been invoked: %dn", stats.Flushed)
fmt.Printf("Number of times workers committed reqs: %dn", stats.Committed)
fmt.Printf("Number of requests indexed : %dn", stats.Indexed)
fmt.Printf("Number of requests reported as created: %dn", stats.Created)
fmt.Printf("Number of requests reported as updated: %dn", stats.Updated)
fmt.Printf("Number of requests reported as success: %dn", stats.Succeeded)
fmt.Printf("Number of requests reported as failed : %dn", stats.Failed)


This is the log that I got



Number of times flush has been invoked: 1
Number of times workers committed reqs: 0
Number of requests indexed : 0
Number of requests reported as created: 0
Number of requests reported as updated: 0
Number of requests reported as success: 0
Number of requests reported as failed : 0


I don't know why the result is 0. I am not sure how to find where the error is. Does anyone know how to find the error?










share|improve this question























  • it's not clear what you are asking. There are six stats at zero and it is a perfectly reasonable result to get back from the query shown. What is the problem you need to understand?

    – Vorsprung
    Nov 26 '18 at 10:11











  • The data is not inserted into elastic search, if there are some data inserted, then the result shouldn't be zero. I am not sure what the error is.

    – Honddoe
    Nov 26 '18 at 10:30











  • You don't show your code for the data insertion but you are saying that's where the error is. So it's impossible for anyone else to say what the problem might be with it ....

    – Vorsprung
    Nov 26 '18 at 11:21
















0















I have changed my code so that it uses olivere package when inserting data into elastic search. This is the code



 // Get a snapshot of stats (always blank if not enabled--see above)
stats := p.Stats()

fmt.Printf("Number of times flush has been invoked: %dn", stats.Flushed)
fmt.Printf("Number of times workers committed reqs: %dn", stats.Committed)
fmt.Printf("Number of requests indexed : %dn", stats.Indexed)
fmt.Printf("Number of requests reported as created: %dn", stats.Created)
fmt.Printf("Number of requests reported as updated: %dn", stats.Updated)
fmt.Printf("Number of requests reported as success: %dn", stats.Succeeded)
fmt.Printf("Number of requests reported as failed : %dn", stats.Failed)


This is the log that I got



Number of times flush has been invoked: 1
Number of times workers committed reqs: 0
Number of requests indexed : 0
Number of requests reported as created: 0
Number of requests reported as updated: 0
Number of requests reported as success: 0
Number of requests reported as failed : 0


I don't know why the result is 0. I am not sure how to find where the error is. Does anyone know how to find the error?










share|improve this question























  • it's not clear what you are asking. There are six stats at zero and it is a perfectly reasonable result to get back from the query shown. What is the problem you need to understand?

    – Vorsprung
    Nov 26 '18 at 10:11











  • The data is not inserted into elastic search, if there are some data inserted, then the result shouldn't be zero. I am not sure what the error is.

    – Honddoe
    Nov 26 '18 at 10:30











  • You don't show your code for the data insertion but you are saying that's where the error is. So it's impossible for anyone else to say what the problem might be with it ....

    – Vorsprung
    Nov 26 '18 at 11:21














0












0








0








I have changed my code so that it uses olivere package when inserting data into elastic search. This is the code



 // Get a snapshot of stats (always blank if not enabled--see above)
stats := p.Stats()

fmt.Printf("Number of times flush has been invoked: %dn", stats.Flushed)
fmt.Printf("Number of times workers committed reqs: %dn", stats.Committed)
fmt.Printf("Number of requests indexed : %dn", stats.Indexed)
fmt.Printf("Number of requests reported as created: %dn", stats.Created)
fmt.Printf("Number of requests reported as updated: %dn", stats.Updated)
fmt.Printf("Number of requests reported as success: %dn", stats.Succeeded)
fmt.Printf("Number of requests reported as failed : %dn", stats.Failed)


This is the log that I got



Number of times flush has been invoked: 1
Number of times workers committed reqs: 0
Number of requests indexed : 0
Number of requests reported as created: 0
Number of requests reported as updated: 0
Number of requests reported as success: 0
Number of requests reported as failed : 0


I don't know why the result is 0. I am not sure how to find where the error is. Does anyone know how to find the error?










share|improve this question














I have changed my code so that it uses olivere package when inserting data into elastic search. This is the code



 // Get a snapshot of stats (always blank if not enabled--see above)
stats := p.Stats()

fmt.Printf("Number of times flush has been invoked: %dn", stats.Flushed)
fmt.Printf("Number of times workers committed reqs: %dn", stats.Committed)
fmt.Printf("Number of requests indexed : %dn", stats.Indexed)
fmt.Printf("Number of requests reported as created: %dn", stats.Created)
fmt.Printf("Number of requests reported as updated: %dn", stats.Updated)
fmt.Printf("Number of requests reported as success: %dn", stats.Succeeded)
fmt.Printf("Number of requests reported as failed : %dn", stats.Failed)


This is the log that I got



Number of times flush has been invoked: 1
Number of times workers committed reqs: 0
Number of requests indexed : 0
Number of requests reported as created: 0
Number of requests reported as updated: 0
Number of requests reported as success: 0
Number of requests reported as failed : 0


I don't know why the result is 0. I am not sure how to find where the error is. Does anyone know how to find the error?







elasticsearch go






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 '18 at 9:53









Honddoe Honddoe

137




137













  • it's not clear what you are asking. There are six stats at zero and it is a perfectly reasonable result to get back from the query shown. What is the problem you need to understand?

    – Vorsprung
    Nov 26 '18 at 10:11











  • The data is not inserted into elastic search, if there are some data inserted, then the result shouldn't be zero. I am not sure what the error is.

    – Honddoe
    Nov 26 '18 at 10:30











  • You don't show your code for the data insertion but you are saying that's where the error is. So it's impossible for anyone else to say what the problem might be with it ....

    – Vorsprung
    Nov 26 '18 at 11:21



















  • it's not clear what you are asking. There are six stats at zero and it is a perfectly reasonable result to get back from the query shown. What is the problem you need to understand?

    – Vorsprung
    Nov 26 '18 at 10:11











  • The data is not inserted into elastic search, if there are some data inserted, then the result shouldn't be zero. I am not sure what the error is.

    – Honddoe
    Nov 26 '18 at 10:30











  • You don't show your code for the data insertion but you are saying that's where the error is. So it's impossible for anyone else to say what the problem might be with it ....

    – Vorsprung
    Nov 26 '18 at 11:21

















it's not clear what you are asking. There are six stats at zero and it is a perfectly reasonable result to get back from the query shown. What is the problem you need to understand?

– Vorsprung
Nov 26 '18 at 10:11





it's not clear what you are asking. There are six stats at zero and it is a perfectly reasonable result to get back from the query shown. What is the problem you need to understand?

– Vorsprung
Nov 26 '18 at 10:11













The data is not inserted into elastic search, if there are some data inserted, then the result shouldn't be zero. I am not sure what the error is.

– Honddoe
Nov 26 '18 at 10:30





The data is not inserted into elastic search, if there are some data inserted, then the result shouldn't be zero. I am not sure what the error is.

– Honddoe
Nov 26 '18 at 10:30













You don't show your code for the data insertion but you are saying that's where the error is. So it's impossible for anyone else to say what the problem might be with it ....

– Vorsprung
Nov 26 '18 at 11:21





You don't show your code for the data insertion but you are saying that's where the error is. So it's impossible for anyone else to say what the problem might be with it ....

– Vorsprung
Nov 26 '18 at 11:21












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53478517%2fno-data-inserted-into-elasticsearch-with-olivere-golang%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53478517%2fno-data-inserted-into-elasticsearch-with-olivere-golang%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)