shopware / shopware/shopware

Property Option Search broken after upgrade

Open
#14,384 0 comments 0 reactions 0 assignees View on GitHub
component/inventory-products domain/inventory Platform(Default) priority/low
Dominant language
PHP
Stars
3.4k
Forks
1.2k
Avg merge
3d 55m
Merged PRs (30d)
436

Description

### Shopware Version

6.6.10.10

### Affected area / extension

Platform(Default)

### Actual behaviour

When searching properties options in the generate variants modal in the administration panel, results are sorted by option name completely ignoring the score of the option against the searched term.

We're using MySQL as search backend in the admin panel but I don't know if this issue is there even with OpenSearch.

The issue has been introduced with this change: https://github.com/shopware/shopware/commit/d5d5141580d6af526c0d93b2c60294bf484e9ae0

### Expected behaviour

Options should be sorted by the score of the option against the searched term.

### How to reproduce

Create 2 color options:
* Dark Blue
* Blue

Then in the generate variant modal search for "dark blue". You should see the options in this order:

1. Dark Blue
2. Blue

But you'll see:

1. Blue
2. Dark Blue

Because both options match the searched term but them are then sorted alphabetically by their name.

Contributor guide

Open the contributing guide

Research direction

Reproduce the property-option search in the generate variants modal with “Dark Blue” and “Blue”, then inspect commit d5d5141580d6af526c0d93b2c60294bf484e9ae0 and the affected search path. Compare MySQL behavior with OpenSearch if available; done means results rank by relevance, with Dark Blue before Blue.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.