add a negative boost for some trigonometric functions that can overlapp other regular promQL functions (#9688)

* add a negative boost for some trigonometric functions that can overlapp other regular promQL functions

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* add comments to explain the purpose of the attribute boost

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
Augustin Husson 2021-11-08 14:32:38 +01:00 committed by GitHub
parent c28b9a0574
commit 4caae4e4a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,12 +142,16 @@ export const functionIdentifierTerms = [
detail: 'function',
info: 'Calculate the cosine, in radians, for input series',
type: 'function',
// Avoid ranking higher than `count`.
boost: -1,
},
{
label: 'cosh',
detail: 'function',
info: 'Calculate the hyperbolic cosine, in radians, for input series',
type: 'function',
// Avoid ranking higher than `count`.
boost: -1,
},
{
label: 'count_over_time',
@ -178,6 +182,8 @@ export const functionIdentifierTerms = [
detail: 'function',
info: 'Convert radians to degrees for input series',
type: 'function',
// Avoid ranking higher than `delta`.
boost: -1,
},
{
label: 'delta',
@ -328,6 +334,8 @@ export const functionIdentifierTerms = [
detail: 'function',
info: 'Convert degrees to radians for input series',
type: 'function',
// Avoid ranking higher than `rate`.
boost: -1,
},
{
label: 'rate',