kopia lustrzana https://github.com/wagtail/wagtail
Don't normalise query strings on search Fixes #937
rodzic
36f782dc03
commit
51d6a69d3d
|
@ -7,7 +7,6 @@ from django.db.models.sql.where import SubqueryConstraint, WhereNode
|
|||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
||||
from wagtail.wagtailsearch.index import class_is_indexed
|
||||
from wagtail.wagtailsearch.utils import normalise_query_string
|
||||
|
||||
|
||||
class FilterError(Exception):
|
||||
|
@ -213,10 +212,6 @@ class BaseSearch(object):
|
|||
if not class_is_indexed(model):
|
||||
return []
|
||||
|
||||
# Normalise query string
|
||||
if query_string is not None:
|
||||
query_string = normalise_query_string(query_string)
|
||||
|
||||
# Check that theres still a query string after the clean up
|
||||
if query_string == "":
|
||||
return []
|
||||
|
|
|
@ -135,7 +135,6 @@ class TestElasticSearchBackend(BackendTests, TestCase):
|
|||
# Even though they both start with the letter "H". This should not be considered a match
|
||||
self.assertEqual(len(results), 0)
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_search_with_hyphen(self):
|
||||
"""
|
||||
This tests that punctuation characters are treated the same
|
||||
|
|
Ładowanie…
Reference in New Issue