vespa-engine / vespa

AI + Data, online. https://vespa.ai
https://vespa.ai
Apache License 2.0
5.78k stars 604 forks source link

Add support for disallowing overriding query properties #24903

Closed jobergum closed 1 year ago

jobergum commented 1 year ago

Ability to lock query properties so they cannot be set in the query request. For example, an app might set different properties in queryProfiles, but end-users of the API can pass overrides. There should be support for disallowing overriding properties. For example ranking.model or input(query).

bjormel commented 1 year ago

I believe that you can do this with

<query-profile id="default">
    <field name="ranking.model" overridable="false">my-ranking-model</field>
</query-profile>

https://docs.vespa.ai/en/query-profiles.html#overrides