Stored Query - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.9
Category
Reference Guide

Key is Stored Query name, value is [(p1name, ... pnname)]rewrite_rule, where $piname can refer to parameter i. Default value for number_of_parameters is 0. Maximum number of parameters is 9. Rewrite_rule can get the value of parameter i with $piname.


  • Usage example without parameter:

with the following:
"soldes", "afs:filter=discount_ratio > 20",

...&afs:storedQuery=soldes()&...
is equivalent to
...&afs:filter=discount_ratio > 20&...


  • Usage example with parameters:

with the following:
"between", "(a,aa)afs:filter=price > $a and price<$aa",

...&afs:storedQuery=between(1, 100)&...
is equivalent to
...&afs:filter=price>1 and price<100&...


Use Back Office Configuration application, and configuration option QEng/SearchFrontEnd/QueryParsing/storedQuery to enable and configure it.

Stored Queries cannot be redefined by agent. For example, the following is forbidden:
...&afs:service=709&afs:storedQuery@Foo=soldes()&...
Also, function code cannot have an agent specific part. For example, the following is forbidden:
afs:filter@Foo=a>b&afs:filter=c=d