Skip to content

Partial search returns (almost) no results #3730

@NTimJuist

Description

@NTimJuist

Preconditions

Magento 2.4.8-p2
Php 8.3

{
"name" : "yqc388-magento2-magweb-tbbm.nodes.hypernode.io",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "2hvDuoK0Q5CtV0bpsjofvA",
"version" : {
"number" : "7.6.0",
"build_flavor" : "oss",
"build_type" : "deb",
"build_hash" : "7f634e9f44834fbc12724506cc1da681b0c3b1e3",
"build_date" : "2020-02-06T00:09:00.449973Z",
"build_snapshot" : false,
"lucene_version" : "8.4.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}

Magento 2.4.8-p2 Community Edition

ElasticSuite Version : 2.11.15.1

Environment : Production mode

Third party modules :

"amasty/aminvisiblecaptcha": "^2.5",
"amasty/cron-scheduler": "^1.0",
"amasty/module-seo-toolkit": "^2.6",
"cweagans/composer-patches": "^1.7",
"experius/module-wysiwygdownloads": "^1.2",
"fishpig/magento2-wordpress-integration-acf": "^3.11",
"fishpig/magento2-wordpress-integration-cpt": "^3.2",
"fishpig/magento2-wordpress-integration-multisite": "^3.4",
"fishpig/magento2-wordpress-integration-pluginshortcodewidget": "^3.19",
"fishpig/magento2-wordpress-integration-root": "^3.3",
"fishpig/magento2-wordpress-integration-yoastseo": "^3.3",
"gene/module-encryption-key-manager": "^0.0.17@alpha",
"hypernode/deploy-configuration": "^3.4",
"mageplaza/magento-2-one-step-checkout-extension": "^4.3",
"mageplaza/module-currency-formatter": "^4.1",
"mageplaza/module-custom-order-number": "^4.0",
"mageplaza/module-delivery-time": "^4.1",
"mageplaza/module-smtp": "^4.7",
"mageplaza/module-store-locator": "^4.7",
"magmodules/m2-rich-snippets-suite": "^2.6",
"mirasvit/module-kb": "^1.2",
"olegkoval/magento2-regenerate-url-rewrites": "^1.7",
"smile/elasticsuite": "^2.11",
"yireo/magento2-webp2": "^0.14.3"

Steps to reproduce

Issue is similar to #3476 and #3149 but I was unable to use any suggestions mentioned there to solve the problem.

It should be noted that our full product database is 700k+, which might be the issue in itself... but I can't find any reason why that would be the issue.

So create some 700k simple products, don't keep track of stock, all enabled and set to 'catalog, search'

Create a couple of simple products, with sku's similar to 'MON9006-1'.

To give some examples:

MON9006-1
MON9200
MON9003-1
MON9018-1

We have 263 products that start with MON9.

Image

SKU settings use 'standard_edge_ngram'. Full settings in the screenshot.

Image

Expected result

Searching for 'MON' returns 43258 results (this contains all 263 mon9) products and is correct.

Search for 'MON9' should show all available 263 products that match the sku's starting with MON9

Searching for 'MON9006-1' should redirect to the specific SKU page.

Actual result

Only MON9200 is returned when searching for 'MON9' (we have redirect to single result enabled).

Image Image Image

Testing directly against elasticsearch Does find me the results:

Total products in ES: 643984 (weird should be 700k+? why is it missing some 94k products?)

=== TESTING SPECIFIC PRODUCT: mon9006-1 ===
✗ mon9006-1 NOT found

=== TESTING PARTIAL SEARCH FUNCTIONALITY ===
Testing 'mon9':
Wildcard search: 263 results
Prefix search: 263 results
Sample results:
- mon9000f
- mon9990
- mon9991

Testing 'mon90':
Wildcard search: 73 results
Prefix search: 73 results
Sample results:
- mon9000f
- mon9011p
- mon9075

Testing 'mon900':
Wildcard search: 7 results
Prefix search: 7 results
Sample results:
- mon9000f
- mon9000r
- mon9003-1

Testing 'mon9006':
Wildcard search: 1 results
Prefix search: 1 results
Sample results:
- mon9006-1

It is only when searching through the frontend that it does not work.

Searching for 'MON', 'MON9006', 'MON9006-' or 'MON9006-1' work without issue.

Searching for 'MON9', 'MON90' or 'MON900' will always show one result (MON9200)'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions