WEEK 9: ENTRY 1

 At my internship today, I continued working on resolving the query size limit that the olivere package poses. As I mentioned in one of my previous posts, the olivere elasticsearch package only returns 0-10 documents by default. This default of the size is an issue because my data pool is over hundred thousand of data. So too, the package does not allow a Bulk Https API request. Therefore, I had to come up with a solution to how to make multiple API calls and combine the chunks into one readable data structure. The idea is to break my hostname arrays into chunks and use each chunk to make the api call. 


Although I had an idea of what I was supposed to do, I did not have any idea how to implement it in Go programming. Thus, I had to google it. After doing a couple of searches, I saw a similar logic on Stackoverflow, which gave me a better idea on how to implement the logic. As usual, I replicated a similar logic on the Go online IDE. Using the online IDE helps me troubleshoot faster and see the bigger picture of my logic. After replicating the logic, it did work. However, unlike the array of integer data types that I found in the solution, my data type is an array of string. So I had to make it work for my array of strings. Having worked with arrays of strings previously, it was easy for me to make this change. Basically, I needed to change the function’s parameters to take in an array of strings and return a string data type. Unlike how python takes parameters and return variables without specifying their data types, Go programming requires you to do those type declarations. The changes I made did resolve the issue and I was able to pass the same logic to my Go project’s file. 


After adding the same logic to my project, it did return a data type error. I had to check my logs to see where this was occurring. It occurred that it was the same mistake I made last week, which was failing to pass my elasticsearch api call output to the Get function. I felt very bad because it was an easy fix and did not require my manager to spot it. I would have love to resolve the whole issue by myself and less assistance from my manager. In my next attempts to resolve the issue, I plan to do it solely by myself with less supervision because this way, I would be confident that I’m making more progress and actually remembering the things I learned previously.


Comments

Popular posts from this blog

WEEK 4: ENTRY 3

WEEK 6: ENTRY 3

WEEK 7: ENTRY 1