I'm trying to figure out what is going wrong with my Algolia search functionality in Magento 1.
I have a product with the name: Huawei P Smart (2019). When I'm trying to find it by regular search (no autocomplete) with phrase p smart 2019 I have an empty result.
But when I search it as p smart (2019) then I have a correct result.
Request for p smart 2019:
{"requests":[{"indexName":"magento_default_products","params":"query: p smart 2019
hitsPerPage: 40
maxValuesPerFacet: 40
page: 0
ruleContexts: ["magento_filters",""]
facets: ["categories_without_path","price.EUR.default","color"]
tagFilters: "}]}
And response:
{
"results":[
{
"hits":[
],
"nbHits":0,
"page":0,
"nbPages":0,
"hitsPerPage":40,
"facets":{
},
"exhaustiveFacetsCount":true,
"exhaustiveNbHits":true,
"query":" 2019",
"params":"query=p%20smart%202019&hitsPerPage=40&maxValuesPerFacet=40&page=0&ruleContexts=%5B%22magento_filters%22%2C%22%22%5D&facets=%5B%22categories_without_path%22%2C%22price.EUR.default%22%2C%22color%22%5D&tagFilters=&filters=&numericFilters=visibility_search%3D1&facetFilters=%5B%22categories_without_path%3Ap+smart%22%5D&query=+2019",
"index":"magento_default_products",
"processingTimeMS":1
}
]
}
What I see in response, is this query = -2019 (- is space here) like it try to match word by word, am I right?
When I'm trying to search by 2019 or -2019 (- is space here) then I have correct results.
My configuration is almost the default one for Magento and Algolia.
Is someone who had a similar issue? Or maybe know where I should look for fix it?