Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search using ElasticSearch fails with phrase_prefix multiMatchType #3458

Open
dalyathan opened this issue Apr 2, 2025 · 0 comments
Open
Labels
type: bug 🐛 Something isn't working

Comments

@dalyathan
Copy link
Contributor

dalyathan commented Apr 2, 2025

Describe the bug
Using phrase_prefix in ElasticsearchOptions.searchConfig.multiMatchType in the latest versions of the ElasticSearch plugin (3.1.x) is causing the search query to fail with the error x_content_parse_exception

To Reproduce
Steps to reproduce the behavior:

  1. Add the following to your vendure-config.ts
ElasticSearch.init({
  searchConfig:{
       multiMatchType: 'phrase_prefix',
  }
})
  1. All search queries should fail with the error x_content_parse_exception

Expected behavior
The search should yield a successful result.

Environment (please complete the following information):

  • @vendure/core version: 3.1.1, 3.1.4 and 3.1.7
  • Nodejs version 20.8.1
  • Database (mysql/postgres etc): sqlite3 v. 5.1.7

Additional context
The error seems to go away when we remove the fuzziness: 'AUTO' that is added in here

@dalyathan dalyathan added the type: bug 🐛 Something isn't working label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant