Getting Unknown key for a VALUE_STRING in [preference] when trying to set preference with search-ui-elasticsearch-connector

I am using React Search UI and the connector from search-ui-elasticsearch-connector and am trying to get more consistent scoring. I believe I need to add a preference based on this document.

It looks like the requestBody parameter in the postProcessRequestBodyFn includes an optional key for preference. When a set the preference to a value, I see it added to the request payload, but I get an error:

Screenshot 2024-08-28 at 10.04.42 AM

Unknown key for a VALUE_STRING in [preference].

Is there a way to add a preference when using search-ui-elasticsearch-connector?

preference is a query parameter, not a request body field.

I don't know how to add query parameters when using search-ui-elasticsearch-connector.