Skip to content

Supporting script_score Query in DSL (not FunctionScore) #1344

Closed
@mhnamaki

Description

@mhnamaki

Hey,
I have checked both docs and tests available for the project. However, I couldn't find a way to formulate a script_query that does not have any function_score.

Indeed, let's assume I have the following desired query packed in a dictionary, how could I'd written it using elasticsearch_dsl?

query_dict = {
            "query": {
                "script_score": {
                    "query": Q(...)
                },
                "script": {
                    "source": "..."
                }
            }
        }

Link to script_score query in ElasticSearch that does not usefunction_score

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions