-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
null_pointer_exception for artificial document term vector request #47723
Labels
>bug
:Search/Search
Search-related issues that do not fall into other categories
Team:Search
Meta label for search team
Comments
martijnvg
added
the
:Search/Search
Search-related issues that do not fall into other categories
label
Oct 8, 2019
Pinging @elastic/es-search (:Search/Search) |
Could you share some more information about the index you are calling this on (e.g. the mappings and settings)? When I execute your request from above like this on 7.3.2 (one node, default 1 shard) I don't get the NPE you see:
but an empty term vector response and no errors.
|
Hi, thanks for your repliy.
|
jimczi
added a commit
to jimczi/elasticsearch
that referenced
this issue
Oct 31, 2019
This commit fixes an NPE when an artificial document contains terms that don't appear in the index. Closes elastic#47723 Closes elastic#48744
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>bug
:Search/Search
Search-related issues that do not fall into other categories
Team:Search
Meta label for search team
I get null_pointer_exception for certain term vector requests. I narrowed it down to a reproducible request, which as follows:
{ "doc": { "entities.en": [ "Fantasy term" ] }, "fields": [ "entities.*" ], "term_statistics": true, "offsets": true, "filter": { "min_term_freq": 1 } }
as a GET request to my index using the _termvectors endpoint.
I get the following response:
{ "error": { "root_cause": [ { "type": "exception", "reason": "failed to execute term vector request" } ], "type": "exception", "reason": "failed to execute term vector request", "caused_by": { "type": "null_pointer_exception", "reason": null } }, "status": 500 }
I'm using Elasticsearch version 7.3.2 as a Docker container using two nodes (same happened for one node) and replicas set to 1.
Elasticsearch version (
bin/elasticsearch --version
):7.3.2
Plugins installed: [hunspell]
JVM version (
java -version
):openjdk version "12.0.2" 2019-07-16
OS version (
uname -a
if on a Unix-like system):Linux elasticsearch-master-0 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64 x86_64 x86_64 GNU/Linux
Provide logs (if relevant):
{"type": "server", "timestamp": "2019-10-08T09:56:54,230+0000", "level": "DEBUG", "component": "o.e.a.t.TransportTermVectorsAction", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "cluster.uuid": "cJYEZvN_Slyj4-aLGqMkvA", "node.id": "83NfGvuxTvKezGfC2ZHilQ", "message": "null: failed to execute [org.elasticsearch.action.termvectors.TermVectorsRequest@454e4b9f]" , "stacktrace": ["org.elasticsearch.transport.RemoteTransportException: [elasticsearch-master-0][10.42.9.29:9300][indices:data/read/tv[s]]", "Caused by: org.elasticsearch.ElasticsearchException: failed to execute term vector request", "at org.elasticsearch.index.termvectors.TermVectorsService.getTermVectors(TermVectorsService.java:149) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.index.termvectors.TermVectorsService.getTermVectors(TermVectorsService.java:78) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TransportTermVectorsAction.shardOperation(TransportTermVectorsAction.java:110) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TransportTermVectorsAction.shardOperation(TransportTermVectorsAction.java:46) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$1.doRun(TransportSingleShardAction.java:112) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758) [elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.3.2.jar:7.3.2]", "at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]", "at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]", "at java.lang.Thread.run(Thread.java:835) [?:?]", "Caused by: java.lang.NullPointerException", "at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?]", "at org.apache.lucene.search.TermStatistics.<init>(TermStatistics.java:65) ~[lucene-core-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:34:03]", "at org.elasticsearch.action.termvectors.TermVectorsFilter.getTermStatistics(TermVectorsFilter.java:289) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TermVectorsFilter.selectBestTerms(TermVectorsFilter.java:221) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.index.termvectors.TermVectorsService.getTermVectors(TermVectorsService.java:138) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.index.termvectors.TermVectorsService.getTermVectors(TermVectorsService.java:78) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TransportTermVectorsAction.shardOperation(TransportTermVectorsAction.java:110) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TransportTermVectorsAction.shardOperation(TransportTermVectorsAction.java:46) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$1.doRun(TransportSingleShardAction.java:112) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.3.2.jar:7.3.2]", "at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]", "at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]", "at java.lang.Thread.run(Thread.java:835) ~[?:?]"] } {"type": "server", "timestamp": "2019-10-08T09:56:54,230+0000", "level": "WARN", "component": "r.suppressed", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "cluster.uuid": "cJYEZvN_Slyj4-aLGqMkvA", "node.id": "83NfGvuxTvKezGfC2ZHilQ", "message": "path: /contents-v2-dev-99349/_termvectors, params: {index=contents-v2-dev-99349}" , "stacktrace": ["org.elasticsearch.transport.RemoteTransportException: [elasticsearch-master-0][10.42.9.29:9300][indices:data/read/tv[s]]", "Caused by: org.elasticsearch.ElasticsearchException: failed to execute term vector request", "at org.elasticsearch.index.termvectors.TermVectorsService.getTermVectors(TermVectorsService.java:149) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.index.termvectors.TermVectorsService.getTermVectors(TermVectorsService.java:78) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TransportTermVectorsAction.shardOperation(TransportTermVectorsAction.java:110) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TransportTermVectorsAction.shardOperation(TransportTermVectorsAction.java:46) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$1.doRun(TransportSingleShardAction.java:112) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758) [elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.3.2.jar:7.3.2]", "at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]", "at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]", "at java.lang.Thread.run(Thread.java:835) [?:?]", "Caused by: java.lang.NullPointerException", "at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?]", "at org.apache.lucene.search.TermStatistics.<init>(TermStatistics.java:65) ~[lucene-core-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:34:03]", "at org.elasticsearch.action.termvectors.TermVectorsFilter.getTermStatistics(TermVectorsFilter.java:289) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TermVectorsFilter.selectBestTerms(TermVectorsFilter.java:221) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.index.termvectors.TermVectorsService.getTermVectors(TermVectorsService.java:138) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.index.termvectors.TermVectorsService.getTermVectors(TermVectorsService.java:78) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TransportTermVectorsAction.shardOperation(TransportTermVectorsAction.java:110) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.termvectors.TransportTermVectorsAction.shardOperation(TransportTermVectorsAction.java:46) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$1.doRun(TransportSingleShardAction.java:112) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758) ~[elasticsearch-7.3.2.jar:7.3.2]", "at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.3.2.jar:7.3.2]", "at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]", "at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]", "at java.lang.Thread.run(Thread.java:835) ~[?:?]"] }
The text was updated successfully, but these errors were encountered: