-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bug
Description
Posting a child document without a parent causes a search exception.
Elasticsearch version: 5.1.2
Plugins installed: []
JVM version: 1.8.0_45
OS version: Windows Server 2012
Steps to reproduce:
1.
PUT my_index
{
"mappings": {
"my_parent": {},
"my_child": {
"_parent": {
"type": "my_parent"
}
}
}
}
PUT my_index/my_child/2?routing=something
{
"text": "This is a child document"
}
GET my_index/my_child/_search
Results:
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 4,
"failed": 1,
"failures": [
{
"shard": 2,
"index": "my_index",
"node": "wHB0VLvxS1Oot6IJaVU3Jg",
"reason": {
"type": "null_pointer_exception",
"reason": null
}
}
]
},
"hits": {
"total": 1,
"max_score": 1,
"hits": []
}
}
Provide logs (if relevant):
[2017-01-24T16:36:35,858][DEBUG][o.e.a.s.TransportSearchAction] [XXX_coordinator] [574] Failed to execute fetch phase
org.elasticsearch.transport.RemoteTransportException: [XXX_data][192.168.10.154:64935][indices:data/read/search[phase/fetch/id]]
Caused by: java.lang.NullPointerException
at org.elasticsearch.search.fetch.subphase.ParentFieldSubFetchPhase.getParentId(ParentFieldSubFetchPhase.java:66) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.search.fetch.subphase.ParentFieldSubFetchPhase.hitExecute(ParentFieldSubFetchPhase.java:49) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:163) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:502) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.action.search.SearchTransportService$13.messageReceived(SearchTransportService.java:356) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.action.search.SearchTransportService$13.messageReceived(SearchTransportService.java:353) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.transport.TcpTransport$RequestHandler.doRun(TcpTransport.java:1385) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:527) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-5.1.2.jar:5.1.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:1.8.0_45]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bug