Skip to content
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

Empty results beyond 10 pages with rescore query #12477

Closed
parthibane opened this issue Jul 27, 2015 · 2 comments
Closed

Empty results beyond 10 pages with rescore query #12477

parthibane opened this issue Jul 27, 2015 · 2 comments

Comments

@parthibane
Copy link

Hi,

we've recently implemented rescore to rank docs, I'm getting empty results when I go beyond 10 pages. if I remove rescore from my DSL query it's returning results. So something happening when paginating with rescore.

For example, let say my search DSL query has "size" is 1 and "from" is 0. It's returning results until "from" is 10, beyond 10 it's returning empty results.

Elasticsearch version : 1.5.2

Please check this issue.

My sample DSL query for 11th page

{
"_source": ["name","id" ],
"query": {
"query_string": {
"query": "any keyword",
"fields": ["_all"]
}
},
"from": 11,
"rescore": {
"query": {
"rescore_query": {
"function_score": {
"script_score": {
"script":"[my script]",
"lang": "groovy"
}
}
},
"score_mode": "multiply"
},
"window_size": 300
}, "size": 1
}

Sample result for 11th page

{
"took": 21,
"timed_out": false,
"_shards": {
"total": 11,
"successful": 11,
"failed": 0
},
"hits": {
"total": 14021,
"max_score": 1,
"hits": [ ]
}
}

@nik9000
Copy link
Member

nik9000 commented Jul 27, 2015

You are going to have more luck if you can post a curl recreation.
On Jul 27, 2015 7:02 AM, "parthibane" notifications@github.com wrote:

Hi,

we've recently implemented rescore to rank docs, I'm getting empty results
when I go beyond 10 pages. if I remove rescore from my DSL query it's
returning results. So something happening when paginating with rescore.

For example, let say my search DSL query has size is 1 and from is 0. It's
returning results until from is 10 beyond 10 it's returns empty results.

Elasticsearch version : 1.5.2

Please check this issue.


Reply to this email directly or view it on GitHub
#12477.

@clintongormley
Copy link

Fixed by #11342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants