Commit daa9666f authored by Pablo Panero's avatar Pablo Panero
Browse files

config: add facets configuration

parent 8af1b93f
......@@ -15,6 +15,7 @@ import os
from flask import request
from invenio_oauthclient.contrib import cern
from invenio_records_rest import config as irr_config
from invenio_records_rest.facets import terms_filter
from .modules.cernsearch.permissions import (record_read_permission_factory,
record_create_permission_factory,
......@@ -116,6 +117,20 @@ RECORDS_REST_ENDPOINTS = dict(
)
)
RECORDS_REST_FACETS = {
'cernsearchqa-webservices': {
'aggs': {
'collection': {
'terms': {'field': 'collection'}
}
},
'post_filters': {
'collection': terms_filter("collection")
}
}
}
RECORDS_REST_ELASTICSEARCH_ERROR_HANDLERS = copy.deepcopy(
irr_config.RECORDS_REST_ELASTICSEARCH_ERROR_HANDLERS)
RECORDS_REST_ELASTICSEARCH_ERROR_HANDLERS['mapper_parsing_exception'] = \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment