result_asdf: Extract a data.frame from Elastic query results

Description Usage Arguments Value

View source: R/result_parse.R

Description

Elastic query results are returned as a complex nested list that is reasonably well-structured but a pain to parse. The basic Search function of elastic has a flag, asdf, to return the results as a data.frame, but there is no generic function to extract the data.frame. This function is tailored to the esadocs index, used in testing, which includes a field (Scientific_Name) that is an array in elasticsearch (list in R) and doesn't coerce to a single variable just using as.data.frame(res).

Usage

1

Arguments

res

An elasticsearch query result

Value

A data.frame of document results


jacob-ogre/esadocs documentation built on May 18, 2019, 8 a.m.