Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
webservices
cern-search
cern-search-rest-api
Commits
daa9666f
Commit
daa9666f
authored
Apr 02, 2019
by
Pablo Panero
Browse files
config: add facets configuration
parent
8af1b93f
Changes
1
Hide whitespace changes
Inline
Side-by-side
cern_search_rest_api/config.py
View file @
daa9666f
...
...
@@ -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'
]
=
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment