This function is used to extract data from a JSON file containing the results of an Elasticsearch query. It converts the results into a tibble, then flattens the '_source' column and removes the '_index', '_id', and '_score' columns.
Examples
if (FALSE) {
# Read Elasticsearch query results from a JSON file
query_result <- read_es_query("path/to/query_result.json")
# View the first few rows of data
head(query_result)
}