Commit f1c53816 authored by Carina Antunes's avatar Carina Antunes
Browse files

EDMS requests: ES timeout + new query parameter: exclude (ES source filtering)

parent 447da9ab
......@@ -317,6 +317,7 @@ SQLALCHEMY_ENGINE_OPTIONS = {
SEARCH_CLIENT_CONFIG = dict(
# allow up to 25 connections to each node
maxsize=int(os.getenv("ELASTICSEARCH_MAX_SIZE", 5)),
timeout=int(os.getenv("ELASTICSEARCH_TIMEOUT", 10)),
)
# Processes file metadata
......
......@@ -126,6 +126,10 @@ def search_factory(self, search: RecordCERNSearch, query_parser=None):
if highlights:
search = search.highlight_options(encoder="html").highlight(*highlights)
excludes = request.args.getlist("exclude", None)
if excludes:
search = search.source(excludes=excludes)
explain = request.args.get("explain", None)
if explain:
search = search.extra(explain=explain)
......
Markdown is supported
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