1

I am using Elasticsearch 5.6 in our Magento Enterprise 2.2.9.

I have already set the SKU to be "not analyzed", so that searching for SKU with dash(-) will give me exact result. Ex 414-123

However, Magento is escaping the dash in the search query.

Magento generated query, no result:

{
"match": {
    "sku": {
        "query": "414\\-123",
        "operator": "OR",
        "prefix_length": 0,
        "max_expansions": 50,
        "fuzzy_transpositions": true,
        "lenient": false,
        "zero_terms_query": "NONE",
        "boost": 2
    }
}

}

No escape character query, 1 result (expected):

{
"match": {
    "sku": {
        "query": "414-123",
        "operator": "OR",
        "prefix_length": 0,
        "max_expansions": 50,
        "fuzzy_transpositions": true,
        "lenient": false,
        "zero_terms_query": "NONE",
        "boost": 2
    }
}

}

Is it possible to remove the escaping in Magento Catalog Search module?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.