For performance reasons, when fuzzy search was introduces it was decided to limit the number of records used for finding fuzzy terms to 1000. Because of this, when a database contains more than 1000 products matching words that start with the same letter, further products are not examined. This can lead to searches not finding an existing exact match. This commit introduces a fallback mechanism so that, if we are in a situation where the maximum number of examined records was fetched, we also explicitly check for a possible exact match across all records. Steps to reproduce: - Do not install the pg_trgm extension. - Have more than 1000 products containing searchable words (name, description...) starting with the same letter. - Add one more such product (so that it is not in the 1000 first ones). - Search for that last product by correctly typing the word. => Exact match was not returned. task-2870947 closes odoo/odoo#97657 X-original-commit: 6d24ea28b236155d542e3d2be3da379b9f4e9ce6 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
17 lines
516 B
Python
17 lines
516 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import test_controller_args
|
|
from . import test_custom_snippet
|
|
from . import test_error
|
|
from . import test_fuzzy
|
|
from . import test_image_upload_progress
|
|
from . import test_is_multilang
|
|
from . import test_media
|
|
from . import test_multi_company
|
|
from . import test_performance
|
|
from . import test_redirect
|
|
from . import test_reset_views
|
|
from . import test_session
|
|
from . import test_views_during_module_operation
|