Comments (7)
Thanks for opening this up @jvondollen . I have one followup question...what type of aggs
are using?
Each aggregation result has a slightly different format, so if you can provide that it would help us narrow down the issue.
The fact that you got log_fatal
means that this is an error we intended to throw, so we may also need to revisit why unpack_nested_data
breaks with an empty column instead of warning and returning NULL.
from uptasticsearch.
This involves some multilevel nested sums aggregated over different terms. It also involves a reverse_nested aggregation. I'm not sure what exactly you men by "type" of aggs, but the query structure is something of the form:
aggs
nested
aggs
nested
aggs
terms
aggs
reverse_nested
aggs
sum
from uptasticsearch.
Oh sorry. By type I mean e.g. stats
, terms
, extended_stats
, etc.
Also I'm sure that we don't have a test for reverse_nested
, so that is something we will have to explore.
One other question...what version of ES are you on? We test uptasticsearch
against all major versions going back to 1.0, but having the version number will help us to nail down where we need to look for additional documentation on Elastic's site.
from uptasticsearch.
Ah, this makes sense since most of my aggregations involve reverse_nested
( stats
and terms
).
I'm currently using ES version 5.6.9
from uptasticsearch.
Ok cool, that helps!
@jvondollen and I talked over email and it revealed something valuable. Sounds like his query was returning 0 results, and the error he got was because of that.
I propose that in that situation, it would be more natural to throw a warning and return an empty data.table
. I think that's more natural. Like imagine the case where you're running some pipeline like this:
resultList <- lapply(vector_of_stuff, function(thing){
es_search("myhost.com:9200", "my_index", sprintf(query_template, thing))
})
resultDT <- data.table::rbindlist(
resultList
, fill = TRUE
)
It would be real annoying if you had 100 queries and couldn't get your result because one of them returned no results.
I prefer an empty data.table
to a straight-up NULL
because it will also prevent code that expects one data.table
from breaking.
This thread revealed another problem...we have no tests for reverse_nested
aggregations! So thanks to you @jvondollen for exposing a couple of weaknesses in the package!
from uptasticsearch.
To close this issue:
- Change aggs handling code to warn and return
data.table::data.table()
on a null result - Add test confirming that empty results from aggs queries return that empty data.table and throw a warning
from uptasticsearch.
Going to close this one, as I think it is addressed by the changes in #70
#59 is still open and we don't currently have support for reverse-nested stuff. @jvondollen if you have the time we'd love your help in addressing that issue! I'm not really familiar with reverse_nested stuff.
from uptasticsearch.
Related Issues (20)
- CI is broken with Java issues again HOT 1
- Release Python client on PyPI
- Bad substitution in setup_local.sh
- multi-line blocks in roxygen documentation should be aligned to the first non-tag word
- Add linting on R code
- standardize directory names on kebob-case HOT 2
- Add 'covr' to Suggests in the R package HOT 2
- Unnecessary numbering in comments
- Add lifecycle badges to README
- Add codecov badge to the README HOT 1
- docs style: inline mentions of functions should use parentheses HOT 2
- Make README examples copy-paste runnable
- explicitly add language tags to all markdown code blocks HOT 1
- hex logo HOT 5
- Replace use of 'ES' with 'Elasticsearch' everywhere in the repo
- problems with certificate HOT 4
- [ci] Move CI from Travis to GitHub Actions HOT 2
- How to enter password and username in to the es_host HOT 3
- How to enter API key to connect to elastic instance HOT 1
- R tests using deprecated testthat functionality
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uptasticsearch.