Skip to content

Commit

Permalink
Merge pull request #40 from dylanmcreynolds/index_data_group
Browse files Browse the repository at this point in the history
Add data_groups index
  • Loading branch information
danielballan authored Dec 16, 2020
2 parents a7b704e + 286059b commit b184b2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions suitcase/mongo_normalized/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def _create_indexes(self):
unique=False, background=True)
self._run_start_collection.create_index([("$**", "text")])
self._run_start_collection.create_index('data_session', unique=False)
self._run_start_collection.create_index('data_groups', unique=False)
self._run_stop_collection.create_index('run_start', unique=True)
self._run_stop_collection.create_index('uid', unique=True)
self._run_stop_collection.create_index(
Expand Down
3 changes: 2 additions & 1 deletion suitcase/mongo_normalized/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,12 @@ def test_index_creation(db_factory):
assert indexes['resource_1']

indexes = metadatastore_db.run_start.index_information()
assert len(indexes.keys()) == 5
assert len(indexes.keys()) == 6
assert indexes['uid_1']['unique']
assert indexes['time_-1_scan_id_-1']
assert indexes['$**_text']
assert indexes['data_session_1']
assert indexes['data_groups_1']

indexes = metadatastore_db.run_stop.index_information()
assert len(indexes.keys()) == 5
Expand Down

0 comments on commit b184b2d

Please sign in to comment.