Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions elasticsearch-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ def create_index(self, index, setting):
'type': 'text',
'analyzer': 'autocomplete'
},
'count': {
'type': 'integer'
},
'created_at': {
'type': 'integer'
}
Expand Down
4 changes: 4 additions & 0 deletions tests/common/test_es_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def test_search_tag(self):
self.__assert_search_tags('apple ora', ['apple orange'])
self.__assert_search_tags('ALIS on', [])

def test_search_tag_with_no_tag(self):
result = ESUtil.search_tag(self.elasticsearch, 'alis', 10, 1)
self.assertEqual(result, [])

def test_search_tag_with_limit(self):
# 0~10のループを回す
for x in range(0, 11):
Expand Down
3 changes: 3 additions & 0 deletions tests/tests_common/tests_es_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def create_tag_index(elasticsearch):
'type': 'text',
'analyzer': 'autocomplete'
},
'count': {
'type': 'integer'
},
'created_at': {
'type': 'integer'
}
Expand Down