Skip to content

Commit

Permalink
fix(search): Replace "_" by " "
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Dec 8, 2023
1 parent 137066d commit 06bd093
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/search/search.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ router.route('/autocomplete')
bool: {
should: [{
query_string: {
query: `*"${query.replace(/-/g, ' ')}"*`,
query: `*"${query.replace(/[-_]/g, ' ')}"*`,
default_operator: 'AND',
fields: searchedFields,
},
}, {
query_string: {
query: `*${query.replace(/-/g, ' ')}*`,
query: `*${query.replace(/[-_]/g, ' ')}*`,
default_operator: 'AND',
fields: searchedFields,
},
Expand Down

0 comments on commit 06bd093

Please sign in to comment.