DE URL with the exact search phrase with comma doesn't return any search results
When searching for "indicators, 2023 edition" as free-text search, the search result page returns dataflows with some containing "indicators, 2023 edition" in its title.
I get 12 search results.
When copying the search URL to share with others, https://data-explorer.oecd.org/?tm=%22indicators%2C%202023%20edition%22&pg=0&snb=12 returns no search results.
In details, it returns a "500 Internal Server Error" with the following message: "searches.trim is not a function".
This occurs during tests in both oecd-prod and DevOps-QA, only when the exact search terms include a comma.
Log entry:
TypeError: searches.trim is not a function
at baseFilters (/sfs/dist/server/search/index.js:73:17)
at _callee$ (/sfs/dist/server/search/index.js:221:22)
at tryCatch (/sfs/dist/server/search/index.js:13:1357)
at Generator.<anonymous> (/sfs/dist/server/search/index.js:13:4174)
at Generator.next (/sfs/dist/server/search/index.js:13:2208)
at asyncGeneratorStep (/sfs/dist/server/search/index.js:14:103)
at _next (/sfs/dist/server/search/index.js:15:194)
at /sfs/dist/server/search/index.js:15:364
at new Promise (<anonymous>)
at /sfs/dist/server/search/index.js:15:97
err: {
message: "failed with status code 500"
stack: "Error: failed with status code 500
at ServerResponse.onResFinished (/sfs/node_modules/pino-http/logger.js:77:38)
at ServerResponse.emit (node:events:525:35)
at onFinish (node:_http_outgoing:950:10)
at callback (node:internal/streams/writable:554:21)
at afterWrite (node:internal/streams/writable:499:5)
at afterWriteTick (node:internal/streams/writable:486:10)
at processTicksAndRejections (node:internal/process/task_queues:82:21)"
type: "Error"
}
The issue is that the URL parameter is parsed wrongly as array into the sfs search input parameter:
"search":["\"indicators"," 2023 edition\""]
where as the text from the DE search keyword textbox(es) is submitted to sfs as:
"search":"\"indicators, 2023 edition\""