Skip to content

Commit

Permalink
Merge e0ee9db into 618c98f
Browse files Browse the repository at this point in the history
  • Loading branch information
brew committed Oct 3, 2018
2 parents 618c98f + e0ee9db commit 4d1dff9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:

before_install:
- sudo rm -f /etc/boto.cfg
- curl -O https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.2.deb && sudo dpkg -i --force-confnew elasticsearch-1.5.2.deb && sudo service elasticsearch restart
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.11.deb && sudo dpkg -i --force-confnew elasticsearch-5.6.11.deb && sudo service elasticsearch restart

install:
- pip install tox coveralls
Expand Down
12 changes: 10 additions & 2 deletions os_package_registry/package_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ class PackageRegistry(object):
"type": "string",
"index": "not_analyzed",
},
'countryCode': {
'type': 'text',
'fields': {
'keyword': {
'type': 'keyword'
}
}
},
'resources': {
"type": "object",
"properties": {
Expand Down Expand Up @@ -246,12 +254,12 @@ def get_stats(self):
},
'num_records': {
'sum': {
'field': 'count_of_rows',
'field': 'package.count_of_rows',
},
},
'num_countries': {
'cardinality': {
'field': 'countryCode',
'field': 'package.countryCode.keyword',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
packages=find_packages(exclude=['tests']),

install_requires=[
'elasticsearch>=1.0.0,<2.0.0',
'elasticsearch>=5.0.0,<6.0.0',
'os-api-cache>=0.0.7'
],
)

0 comments on commit 4d1dff9

Please sign in to comment.