Skip to content

Commit

Permalink
Merge pull request #24 from petrjasek/uat
Browse files Browse the repository at this point in the history
remove extra wire aggregations
  • Loading branch information
petrjasek authored Jan 9, 2024
2 parents 17f860d + 2be41d1 commit 73b2a0f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
15 changes: 14 additions & 1 deletion server/settings.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import pathlib

from flask_babel import lazy_gettext
Expand Down Expand Up @@ -95,6 +96,13 @@
},
]

WIRE_AGGS = {
"genre": {"terms": {"field": "genre.name", "size": 50}},
"_subject": {
"terms": {"field": "subject.name", "size": 50}
}, # it's needed for nested groups
}

CORE_APPS = [
app
for app in DEFAULT_CORE_APPS
Expand Down Expand Up @@ -175,10 +183,15 @@
"DATETIME_FORMAT": "H.mm D.M.YYYY",
"COVERAGE_DATE_FORMAT": "LL",
"COVERAGE_DATE_TIME_FORMAT": "HH.mm d.M.YYYY",

# server formats
"DATE_FORMAT_HEADER": "d.M.yyyy H.mm",
"NOTIFICATION_EMAIL_TIME_FORMAT": "H.mm",
"NOTIFICATION_EMAIL_DATE_FORMAT": "d.M.yyyy",
"NOTIFICATION_EMAIL_DATETIME_FORMAT": "d.M.yyyy klo H.mm",
}

ELASTICSEARCH_TRACK_TOTAL_HITS = (
int(os.environ["ELASTICSEARCH_TRACK_TOTAL_HITS"])
if os.environ.get("ELASTICSEARCH_TRACK_TOTAL_HITS")
else True
)
4 changes: 0 additions & 4 deletions server/stt/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,3 @@ def init_app(app):
app.config['SOURCES'][resource]['projection'].update({
field: 1,
})

app.config['WIRE_AGGS'].update({
field: {'terms': {'field': field, 'size': 50}},
})

0 comments on commit 73b2a0f

Please sign in to comment.