WEEK 7: ENTRY 2
Today at my internship, I was tasked to create an elasticsearch query to generate different properties of a field. Elasticsearch is a Rest API search engine that makes searching for data very fast and straightforward. It involves using clusters and indexing to generate data. One can generate the data in two ways: by using the Elasticsearch CLI or writing an elasticsearch query. I chose to use the latter because I needed to write a Golang HTTPS request and pass that query in order to get the data that I specified in my query. Unlike how easy or rather simpler it was for me when I had to write the Big Query API query, it was a different experience today because elasticsearch query does not use SQL querying. It uses a DSL query, which simply refers to Domain Specific Language. The DAL is based on Json to define queries: key value pairing.
Apart from the fact that I had no prior experience with DSL queries, I also did not have any experience with the Elasticsearch API. Therefore, I spent some time reading about the different components that are on the Elasticsearch API. To my surprise, I learned that the API has a console, where I could write basic DSL queries and test out my understanding. So too, my manager sent me an Elasticsearch CLI command that I could replicate to a DSL query. This really helped me getting started with console practice. However, it deviated my attention and understanding on what other query methods I could use to generate the result I needed for my query. Instead of reading more about DSL queries, I spent ample time trying to replicate the CLI command that he sent me. I struggled to write it into a DSL query because that query was used for a different purpose. It mainly made use of the fields option sub-level from the data and not the _source option. Thus, I had to rely on my manager to pinpoint that to me, which I didn’t feel proud of myself.
Overall, today was a mixed feeling of understanding the elasticsearch api tool Inwas using and realizing that it is very important to look at the bigger picture and not rely on references to resolve your issue. I gained the insight that references are meant to guide you closer to the solution and not exactly the solution. Thus, henceforth, I plan to use references as guidance and not replicating them to resolve my issues. So too, I intend to be more alert and proactive with my Google searches because it is one of the most important skills one must have. I learned that tailoring a google search brings you closer to the answer you’re looking for.
Comments
Post a Comment