Passing parameters to preloaded scripts

I'm trying to use a preloaded javascript file stored in /config/scripts/test.js

http://www.elasticsearch.org/guide/reference/query-dsl/custom-score-query.html

I'm using the Tire gem for Rails integration.

query do
custom_score :params => {:stuck_out_tongue: => 5}, :script => "test", :lang => "js" do string '* end end

If I use an inline script expression, I can access the parameter p very easily. How do I pass it to the preloaded script test.js?

Thanks!
George