Full text search for repository name and description
Adds support for searching full text against the name and description of a repository [Delivers #134867401]
This commit is contained in:
parent
d65d32b284
commit
973a110ac7
5 changed files with 73 additions and 12 deletions
|
@ -1001,6 +1001,23 @@ class TestConductSearch(ApiTestCase):
|
|||
self.assertEquals(json['results'][0]['name'], 'shared')
|
||||
|
||||
|
||||
def test_full_text(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
# Make sure the repository is found via `full` and `text search`.
|
||||
json = self.getJsonResponse(ConductSearch,
|
||||
params=dict(query='full'))
|
||||
self.assertEquals(1, len(json['results']))
|
||||
self.assertEquals(json['results'][0]['kind'], 'repository')
|
||||
self.assertEquals(json['results'][0]['name'], 'text-full-repo')
|
||||
|
||||
json = self.getJsonResponse(ConductSearch,
|
||||
params=dict(query='text search'))
|
||||
self.assertEquals(1, len(json['results']))
|
||||
self.assertEquals(json['results'][0]['kind'], 'repository')
|
||||
self.assertEquals(json['results'][0]['name'], 'text-full-repo')
|
||||
|
||||
|
||||
class TestGetMatchingEntities(ApiTestCase):
|
||||
def test_simple_lookup(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
|
Reference in a new issue