File tree Expand file tree Collapse file tree 2 files changed +32
-3
lines changed
zenodo_rdm/index_templates/os-v2 Expand file tree Collapse file tree 2 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 2626from invenio_vocabularies .contrib .funders .api import Funder
2727from invenio_vocabularies .proxies import current_service as vocabulary_service
2828from invenio_vocabularies .records .api import Vocabulary
29-
3029from zenodo_rdm .api import ZenodoRDMDraft , ZenodoRDMRecord
3130from zenodo_rdm .custom_fields import CUSTOM_FIELDS , CUSTOM_FIELDS_UI , NAMESPACES
3231from zenodo_rdm .generators import media_files_management_action
@@ -86,6 +85,22 @@ def app_config(app_config):
8685 return app_config
8786
8887
88+ @pytest .fixture (scope = "module" )
89+ def search (search ):
90+ from invenio_search import current_search , current_search_client
91+ from invenio_search .engine import search
92+
93+ try :
94+ list (current_search .put_templates ())
95+ list (current_search .put_index_templates ())
96+ except search .RequestError :
97+ pass
98+
99+ current_search_client .indices .refresh ()
100+ yield search
101+ # Cleanup?
102+
103+
89104@pytest .fixture (scope = "function" )
90105def db_session_options ():
91106 """Database session options."""
Original file line number Diff line number Diff line change 11{
22 "priority" : 100 ,
3- "index_patterns" : [" __SEARCH_INDEX_PREFIX__rdmrecords-*" ],
3+ "index_patterns" : [
4+ " __SEARCH_INDEX_PREFIX__rdmrecords-*"
5+ ],
46 "template" : {
57 "settings" : {
6- "number_of_shards" : 3
8+ "number_of_shards" : 3
9+ },
10+ "mappings" : {
11+ "properties" : {
12+ "swh" : {
13+ "type" : " object" ,
14+ "properties" : {
15+ "swhid" : {
16+ "type" : " keyword"
17+ }
18+ }
19+ }
20+ }
721 }
822 }
923}
You can’t perform that action at this time.
0 commit comments