indexer: Allow the definition of indices in index_templates, instead … #179
Annotations
3 errors
|
Run tests:
invenio_indexer/utils.py#L1
Black format check
--- /home/runner/work/invenio-indexer/invenio-indexer/invenio_indexer/utils.py 2024-03-04 12:22:44.635731 +0000
+++ /home/runner/work/invenio-indexer/invenio-indexer/invenio_indexer/utils.py 2024-03-04 12:24:01.145284 +0000
@@ -52,11 +52,13 @@
:param record: The record object.
:returns: index.
"""
# The indices could be defined either in the mappings or in the index_templates
- index_names = list(current_search.mappings.keys()) + list(current_search.index_templates.keys())
+ index_names = list(current_search.mappings.keys()) + list(
+ current_search.index_templates.keys()
+ )
schema = record.get("$schema", "")
if isinstance(schema, dict):
schema = schema.get("$ref", "")
index = schema_to_index(schema, index_names=index_names)
|
Run tests
Process completed with exit code 1.
|
Loading