Examples - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.7
Category
Reference Guide

Find hereafter configuration examples of the query rewriting module.

[
{
"pre": [],
"match": {
"type": "keywords",
"match": "foster"
},
"actions": [
{
"type": "removeMatch"
},
{
"type": "addParameter",
"param": "afs:filter",
"value": "brand=\"$1\""
}
]
}
]

[
{
"pre": [],
"match": {
"type": "keywords",
"match": "scott"
},
"actions": [
{
"type": "removeMatch"
},
{
"type": "addParameter",
"param": "afs:filter",
"value": "brand=\"$1\""
}
]
}
]

[
{
"pre": [],
"match": {
"type": "keywords",
"match": "remove filter"
},
"actions": [
{
"type": "removeParameter",
"param": "afs:filter",
"value": "filter=true"
},
{
"type": "keepMatch"
}
]
}
]

[
{
"pre": [
{
"type": "equals",
"param": "afs:filter",
"value": "lang=\"fr\""
}
],
"match": {
"type": "keywords",
"match": "foo"
},
"actions": [
{
"type": "removeMatch"
}
]
}
]

[
{
"pre": [
{
"type": "differs",
"param": "afs:filter",
"value": "lang=\"fr\""
}
],
"match": {
"type": "keywords",
"match": "foo"
},
"actions": [
{
"type": "removeMatch"
}
]
}
]

[
{
"pre": [],
"match": {
"type": "keywords",
"match": "ceinture"
},
"actions": [
{
"type": "addKeywordsAfterMatch",
"keywords": "-passants"
}
]
}
]

[
{
"pre": [],
"match": {
"type": "compare",
"match": "moins de",
"unit": "\u20ac"
},
"actions": [
{
"type": "removeMatch"
},
{
"type": "addParameter",
"param": "afs:filter",
"value": "prix<$1"
}
]
},
{
"pre": [],
"match": {
"type": "compare",
"match": "plus de",
"unit": "\u20ac"
},
"actions": [
{
"type": "removeMatch"
},
{
"type": "addParameter",
"param": "afs:filter",
"value": "prix>=$1"
}
]
}
]

[
{
"pre": [],
"match": {
"type": "interval",
"match1": "entre",
"match2": "et",
"unit": "m2"
},
"actions": [
{
"type": "removeMatch"
},
{
"type": "addParameter",
"param": "afs:filter",
"value": "surface>=\"$1\""
},
{
"type": "addParameter",
"param": "afs:filter",
"value": "surface<=\"$2\""
}
]
}
]