Describe the bug
FT.SEARCH does not fully apply parameter substitution for the AS clause in vector queries.
When AS uses a substituted parameter such as $alias, the substitution is applied to a parse-time field, but the resolved value is not propagated to the final score_as field used later in execution.
As a result, the literal parameter reference may be preserved instead of the substituted alias.
To Reproduce
Run a vector query where the score alias is parameterized:
FT.SEARCH idx "*=>[KNN 10 @vec $BLOB AS $ALIAS]" PARAMS 4 BLOB <binary-vector> ALIAS my_score DIALECT 2
Observe that the returned score field alias may remain $ALIAS instead of my_score.
Expected behavior
The AS clause should honor parameter substitution in the same way as other vector-query parameters.
For the example above, the final score field alias should be my_score, not the literal $ALIAS.
Describe the bug
FT.SEARCHdoes not fully apply parameter substitution for theASclause in vector queries.When
ASuses a substituted parameter such as$alias, the substitution is applied to a parse-time field, but the resolved value is not propagated to the finalscore_asfield used later in execution.As a result, the literal parameter reference may be preserved instead of the substituted alias.
To Reproduce
Run a vector query where the score alias is parameterized:
Observe that the returned score field alias may remain $ALIAS instead of my_score.
Expected behavior
The AS clause should honor parameter substitution in the same way as other vector-query parameters.
For the example above, the final score field alias should be my_score, not the literal $ALIAS.