Don't normalise query strings on search Fixes #937

pull/939/head
Karl Hobley 2015-01-28 09:59:43 +00:00
rodzic 36f782dc03
commit 51d6a69d3d
2 zmienionych plików z 0 dodań i 6 usunięć

Wyświetl plik

@ -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 []

Wyświetl plik

@ -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