Skip to content

Commit

Permalink
Merge 1a33795 into 078f29c
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaraBi committed Mar 19, 2018
2 parents 078f29c + 1a33795 commit d6c98e3
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ env:
global:
- ES2_DOWNLOAD_URL="https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.2/elasticsearch-2.4.2.tar.gz"
- ES5_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.4.tar.gz"
- ES6_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.0.tar.gz"
- ES_HOST=127.0.0.1
matrix:
# ES 6: Redis vs RabbitMQ
- REQUIREMENTS=release EXTRAS=all,elasticsearch6 BROKER_URL=redis://localhost:6379/0 ES_URL=$ES6_DOWNLOAD_URL
- REQUIREMENTS=devel EXTRAS=all,elasticsearch6 BROKER_URL=amqp://localhost:5672// ES_URL=$ES6_DOWNLOAD_URL
# ES 5: Redis vs RabbitMQ
- REQUIREMENTS=lowest EXTRAS=all,elasticsearch5 BROKER_URL=redis://localhost:6379/0 ES_URL=$ES5_DOWNLOAD_URL
- REQUIREMENTS=lowest EXTRAS=all,elasticsearch5 BROKER_URL=amqp://localhost:5672// ES_URL=$ES5_DOWNLOAD_URL
- REQUIREMENTS=release EXTRAS=all,elasticsearch5 BROKER_URL=redis://localhost:6379/0 ES_URL=$ES5_DOWNLOAD_URL
- REQUIREMENTS=release EXTRAS=all,elasticsearch5 BROKER_URL=amqp://localhost:5672// ES_URL=$ES5_DOWNLOAD_URL DEPLOY=true
- REQUIREMENTS=devel EXTRAS=all,elasticsearch5 BROKER_URL=redis://localhost:6379/0 ES_URL=$ES5_DOWNLOAD_URL
- REQUIREMENTS=devel EXTRAS=all,elasticsearch5 BROKER_URL=amqp://localhost:5672// ES_URL=$ES5_DOWNLOAD_URL
# ES 2: Redis only
- REQUIREMENTS=lowest EXTRAS=all,elasticsearch2 BROKER_URL=redis://localhost:6379/0 ES_URL=$ES2_DOWNLOAD_URL
- REQUIREMENTS=release EXTRAS=all,elasticsearch2 BROKER_URL=redis://localhost:6379/0 ES_URL=$ES2_DOWNLOAD_URL
- REQUIREMENTS=devel EXTRAS=all,elasticsearch2 BROKER_URL=redis://localhost:6379/0 ES_URL=$ES2_DOWNLOAD_URL

jdk:
- "oraclejdk8"
Expand Down
Empty file added examples/data/v6/__init__.py
Empty file.
27 changes: 27 additions & 0 deletions examples/data/v6/testrecords/testrecord-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"mappings": {
"testrecord-v1.0.0": {
"properties": {
"control_number": {
"type": "keyword"
},
"description": {
"type": "text"
},
"participants": {
"type": "long"
},
"title": {
"type": "text",
"copy_to": "suggest_title"
},
"type": {
"type": "keyword"
},
"suggest_title": {
"type": "completion"
}
}
}
}
}
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@
'elasticsearch5': [
'invenio-search[elasticsearch5]>={}'.format(invenio_search_version),
],
'elasticsearch6': [
'invenio-search[elasticsearch6]>={}'.format(invenio_search_version),
],
'tests': tests_require,
}

extras_require['all'] = []
for name, reqs in extras_require.items():
if name[0] == ':' or name in ('elasticsearch2', 'elasticsearch5'):
if name[0] == ':' or name in ('elasticsearch2', 'elasticsearch5', 'elasticsearch6'):
continue
extras_require['all'].extend(reqs)

Expand Down
9 changes: 9 additions & 0 deletions tests/data/v6/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2017-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

"""Elasticsearch v6 mappings."""
1 change: 1 addition & 0 deletions tests/data/v6/records/authorities/authority-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mappings": {}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mappings": {}}
1 change: 1 addition & 0 deletions tests/data/v6/records/default-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mappings": {}}

0 comments on commit d6c98e3

Please sign in to comment.