-
Couldn't load subscription status.
- Fork 2.3k
Open
Labels
SearchSearch query, autocomplete ...etcSearch query, autocomplete ...etcbugSomething isn't workingSomething isn't working
Description
Describe the bug
When the from parameter in the search query is negative, the search fails with search_phase_execution_exception (HTTP status 500)
To Reproduce
Steps to reproduce the behavior:
- Create an index
my-index - Add few documents
POST "_bulk?pretty" -H 'Content-Type: application/json' -d'
{ "index": { "_index": "my-index", "_id": "1" } }
{ "description": "ice cream" }
{ "index": { "_index": "my-index", "_id": "2" } }
{ "description": "croissant" }
{ "index": { "_index": "my-index", "_id": "3" } }
{ "description": "tennis shoe" }
{ "index": { "_index": "my-index", "_id": "4" } }
{ "description": "hightop" }
'
- Perform search
POST "my-index/_search?pretty" -H 'Content-Type: application/json' -d '{"size":10,"from":-5}'
- See error
{
"error" : {
"root_cause" : [ ],
"type" : "search_phase_execution_exception",
"reason" : "",
"phase" : "fetch",
"grouped" : true,
"failed_shards" : [ ],
"caused_by" : {
"type" : "null_pointer_exception",
"reason" : "Cannot read field \"shardIndex\" because \"shardDoc\" is null"
}
},
"status" : 500
}
Expected behavior
Search should fail with illegal_argument_exception (HTTP status 400)
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
- OS: [e.g. iOS]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
SearchSearch query, autocomplete ...etcSearch query, autocomplete ...etcbugSomething isn't workingSomething isn't working
Type
Projects
Status
Later (6 months plus)