I need to search products of which name starts with a specific letter or number.
Thus, I added the prefix filter as a normal shopware filter and then gets passed into elasticsearch:
$criteria->addFilter(new PrefixFilter('name', $searchTerm));
The mapping on the name field of the product is this one (shopware default, not altered):
Down the line the prefix filter gets turned by shopware elasticsearch into:
The result is that shopware doesn’t look for products of which name starts with a letter (in this case E) but products which have words starting with that letter in their name:
Can I change it so that the prefix search looks at the starting of the phrase only instead of each separated word in the name?