Elasticsearch Next 7.x - ScriptQuery Id and Params Properties alternative to get Stored Script using its ID

We have updated to Nest 7 from Nest 6. We are getting compiler error with exception ScriptQuery does not contain a definition for Id and Params.

Here, we are trying to get a stored script using its ID. But seems these properties are removed in the Nest 7.x version.

Below code throws the exception:

scoreFunction = new ScriptScoreFunction 
{
    Script = new ScriptQuery 
    { 
        Id = "dummy_stored_script", 
        Params = Input.SearchParamvalue 
     }
};

What is the alternative to this code in order to retrieve the stored script using id and param?
Kindly help as we are unable to move past this.

Thanks in advance!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.