Comments (6)
Pinging @elastic/ml-core (Team:ML)
from elasticsearch.
Pinging @elastic/es-analytical-engine (Team:Analytics)
from elasticsearch.
@dgieselaar is the original finder of this bug.
@dgieselaar it doesn't seem like the request has random_sampler
in it at all? Is this all about categorize_text
with a top_hits
sub aggregation?
from elasticsearch.
@benwtrent no, my head is a mess today. copied the wrong request. Here is the right one:
GET logs-foo-default*/_search?error_trace=true
{
"track_total_hits": false,
"size": 0,
"query": {
"bool": {
"filter": [
{
"range": {
"@timestamp": {
"gte": "now-24h"
}
}
}
]
}
},
"aggs": {
"sampler": {
"random_sampler": {
"probability": 1
},
"aggs": {
"samples": {
"top_hits": {
"size": 3,
"_source": [
"message"
]
}
}
}
}
}
}
from elasticsearch.
Thank you @dgieselaar ! I was able to replicate. It is repeatable with some very simple text data.
POST test_text/_search
{
"aggs": {
"random_sampler": {
"random_sampler": {
"probability": 0.5
},
"aggs": {
"samples": {
"top_hits": {
"size": 1,
"_source": [
"text"
]
}
}
}
}
}
}
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.lucene.search.Scorable.score()" because "this.scorer" is null
at [email protected]/org.apache.lucene.search.TopScoreDocCollector$SimpleTopScoreDocCollector$1.collect(TopScoreDocCollector.java:72)
at [email protected]/org.elasticsearch.search.aggregations.metrics.TopHitsAggregator$1.collect(TopHitsAggregator.java:159)
at [email protected]/org.elasticsearch.search.aggregations.bucket.BucketsAggregator.collectExistingBucket(BucketsAggregator.java:97)
at [email protected]/org.elasticsearch.search.aggregations.bucket.BucketsAggregator.collectBucket(BucketsAggregator.java:81)
at [email protected]/org.elasticsearch.search.aggregations.bucket.sampler.random.RandomSamplerAggregator.getLeafCollector(RandomSamplerAggregator.java:120)
at [email protected]/org.elasticsearch.search.aggregations.AggregatorBase.getLeafCollector(AggregatorBase.java:222)
at [email protected]/org.elasticsearch.search.aggregations.MultiBucketCollector$1.getLeafCollector(MultiBucketCollector.java:92)
at [email protected]/org.elasticsearch.search.aggregations.AggregatorCollector.getLeafCollector(AggregatorCollector.java:35)
at [email protected]/org.elasticsearch.search.query.QueryPhaseCollector.getLeafCollector(QueryPhaseCollector.java:165)
at [email protected]/org.elasticsearch.search.internal.ContextIndexSearcher.searchLeaf(ContextIndexSearcher.java:415)
at [email protected]/org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:360)
at [email protected]/org.elasticsearch.search.internal.ContextIndexSearcher.lambda$search$4(ContextIndexSearcher.java:345)
at [email protected]/org.apache.lucene.search.TaskExecutor$TaskGroup.lambda$createTask$0(TaskExecutor.java:117)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
from elasticsearch.
There are two causes here:
One, with probility is 1.0
we return a collector that doesn't accept setting the scorer.
if (probability >= 1.0) {
grow(1);
return new LeafBucketCollector() {
@Override
public void collect(int doc, long owningBucketOrd) throws IOException {
collectExistingBucket(sub, doc, 0);
}
};
}
So, that needs to accept scorable and pass it to the sub.
But for collectExistingBucket
, we need the scorable there and I am not sure its possible.
"stack_trace": "java.lang.NullPointerException: Cannot invoke \"org.apache.lucene.search.Scorable.score()\" because \"this.scorer\" is null
\tat [email protected]/org.apache.lucene.search.TopScoreDocCollector$SimpleTopScoreDocCollector$1.collect(TopScoreDocCollector.java:72)
\tat [email protected]/org.elasticsearch.search.aggregations.metrics.TopHitsAggregator$1.collect(TopHitsAggregator.java:158)
\tat [email protected]/org.elasticsearch.search.aggregations.bucket.BucketsAggregator.collectExistingBucket(BucketsAggregator.java:98)
\tat [email protected]/org.elasticsearch.search.aggregations.bucket.sampler.random.RandomSamplerAggregator.getLeafCollector(RandomSamplerAggregator.java:132)
\tat [email protected]/org.elasticsearch.search.aggregations.AggregatorBase.getLeafCollector(AggregatorBase.java:222)
\tat [email protected]/org.elasticsearch.search.aggregations.MultiBucketCollector$1.getLeafCollector(MultiBucketCollector.java:92)
\tat [email protected]/org.elasticsearch.search.aggregations.AggregatorCollector.getLeafCollector(AggregatorCollector.java:35)
\tat [email protected]/org.elasticsearch.search.query.QueryPhaseCollector.getLeafCollector(QueryPhaseCollector.java:165)
\tat [email protected]/org.elasticsearch.search.internal.ContextIndexSearcher.searchLeaf(ContextIndexSearcher.java:420)
\tat [email protected]/org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:365)
\tat [email protected]/org.elasticsearch.search.internal.ContextIndexSearcher.lambda$search$3(ContextIndexSearcher.java:350)
\tat [email protected]/org.apache.lucene.search.TaskExecutor$TaskGroup.lambda$createTask$0(TaskExecutor.java:117)
\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
\tat [email protected]/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)
\tat [email protected]/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:984)
\tat [email protected]/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
\tat java.base/java.lang.Thread.run(Thread.java:1570)
"
from elasticsearch.
Related Issues (20)
- [CI] NativePrivilegeStoreCacheTests testGetPrivilegesUsesCache failing HOT 7
- [CI] SecurityIndexRolesMetadataMigrationIT testMetadataMigratedAfterUpgrade failing HOT 3
- Optimize the loop processing of URL decoding HOT 1
- More efficient implementation of ignore_above in synthetic source for flattened fields HOT 1
- [Milestone 1] Update latest findings index and privileges in elasticsearch
- [CI] ValueSourceReaderTypeConversionTests testLoadAll failing HOT 2
- Tripped assertion in CI regarding event.ingested range HOT 3
- LogsDB - Indexing overhead performance testing of `ignore_malformed` HOT 2
- ESQL: FoldNull folding aggs into literals, raising an "unknown agg" error HOT 6
- The index mode validation doesn't always kick in when updating settings HOT 1
- [CI] EsqlNodeSubclassTests testReplaceChildren {class org.elasticsearch.xpack.esql.plan.physical.FieldExtractExec} failing HOT 6
- Discrepancy in Arabic Snowball Stemmer for the word "بطاطس" HOT 2
- ∯Today's!!~ 100%-FREE!! Onlyfans Premium Account Generator Tools 2024-2025
- [CI] LangPainlessClientYamlTestSuiteIT test {yaml=painless/146_dense_vector_bit_basic/Cosine Similarity is not supported} failing HOT 3
- [CI] LangPainlessClientYamlTestSuiteIT test {yaml=painless/146_dense_vector_bit_basic/Dot Product is not supported} failing HOT 7
- [CI] EsqlNodeSubclassTests testInfoParameters {class org.elasticsearch.xpack.esql.plan.physical.ExchangeSinkExec} failing HOT 2
- [CI] EsqlNodeSubclassTests testInfoParameters {class org.elasticsearch.xpack.esql.plan.physical.ExchangeExec} failing HOT 2
- [CI] EsqlSpecIT test {k8s-metrics.TwoRatesWithBucket SYNC} failing HOT 1
- [CI] Various LOOKUP tests failing in release-tests HOT 3
- ESQL: Async fetch can fail with index_not_found if the async results index isn't yet created but the task is done HOT 2
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 elasticsearch.