mirror of
https://github.com/django/django.git
synced 2025-08-31 07:47:37 +00:00
Refs #31304 -- Made __search lookup default to its rhs' config.
This make the SearchLookup lookup more coherent with its SearchVectorExact base which configures its rhs SearchQuery with its lhs' config.
This commit is contained in:
parent
df4d622cac
commit
7c8b043a03
2 changed files with 8 additions and 1 deletions
|
@ -104,6 +104,12 @@ class SimpleSearchTest(GrailTestData, PostgreSQLTestCase):
|
|||
searched = Line.objects.filter(dialogue__search='Robin killed')
|
||||
self.assertSequenceEqual(searched, [self.verse0])
|
||||
|
||||
def test_search_query_config(self):
|
||||
searched = Line.objects.filter(
|
||||
dialogue__search=SearchQuery('nostrils', config='simple'),
|
||||
)
|
||||
self.assertSequenceEqual(searched, [self.verse2])
|
||||
|
||||
|
||||
@modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'})
|
||||
class SearchVectorFieldTest(GrailTestData, PostgreSQLTestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue