We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm trying to implement a function score using elasticsearch-dsl-py. So I'm trying to use ScoreFunction like so:
elasticsearch-dsl-py
ScoreFunction
score_function = ScoreFunction(weight=5, filter=Range(linked_user__last_login={'gt': 'now-1y'}))
However if I call to_dict on that method I can see the dictionary returned has None as a key which seems wrong:
to_dict
None
{None: {}, 'filter': {'range': {'linked_user.last_login': {'gt': 'now-1y'}}}, 'weight': 5}
Then if I try to use that with my search like so (after a hint from here: #608 (comment)):
search.query = FunctionScore(query=search.query, functions=[score_function])
and call search.execute() I get:
search.execute()
RequestError(400, 'parsing_exception', 'unknown query [function_score] did you mean any of [random_score, script_score]?')
What's the cause for this? The only documentation I can find on this is in issue #608 and using the example results in the following error.
Thank you!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I'm trying to implement a function score using
elasticsearch-dsl-py
. So I'm trying to useScoreFunction
like so:However if I call
to_dict
on that method I can see the dictionary returned hasNone
as a key which seems wrong:Then if I try to use that with my search like so (after a hint from here: #608 (comment)):
and call
search.execute()
I get:What's the cause for this? The only documentation I can find on this is in issue #608 and using the example results in the following error.
Thank you!
The text was updated successfully, but these errors were encountered: