Skip to content

Scroll API fails to apply Rescore query #31775

Closed
@bwsawyer

Description

@bwsawyer

Elasticsearch version (bin/elasticsearch --version):
Elasticsearch 6.3.0

Plugins installed: []
None

JVM version (java -version):
java version "1.8.0_171"

OS version (uname -a if on a Unix-like system):
Darwin mbp-bsawy-5018 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64

Description of the problem including expected versus actual behavior:
Performing a query using the Scroll API does not apply the 'rescore' portion of the query.

Steps to reproduce:

  1. Create test index with one document:
PUT index

POST index/_doc
{
  "field": "value"
}
  1. Run query with a rescore and see that the score returned for the hit is as expected (eg. _score=101)
GET index/_search
{
  "query": {
    "match_all": {}
  },
  "rescore": {
    "query": {
      "rescore_query": {
        "function_score": {
          "weight": 100
        }
      }
    }
  }
}
  1. Run same query but with a scroll and that the score seems to indicate that the rescore was not applied (eg. _score=1)
GET index/_search?scroll=1m
{
  "query": {
    "match_all": {}
  },
  "rescore": {
    "query": {
      "rescore_query": {
        "function_score": {
          "weight": 100
        }
      }
    }
  }
}

This appears to affect all 6.* versions of Elasticsearch but is not present in 5.*

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions