Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: include es 8.0 in build process #1286

Merged
merged 4 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
elasticsearch: [ 7.4, 7.10.2, 7.14, 7.16, 7.17 ]
elasticsearch: [ 7.4, 7.10.2, 7.14, 7.16, 7.17, 8.0 ]
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion src/rubrix/server/tasks/commons/dao/dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def search_records(
"_source": {"excludes": exclude_fields or []},
"from": record_from,
"query": search.query or {"match_all": {}},
"sort": search.sort or [{"_id": {"order": "asc"}}],
"sort": search.sort or [{"id": {"order": "asc"}}],
"aggs": aggregation_requests,
"highlight": self.__configure_query_highlight__(),
}
Expand Down
10 changes: 8 additions & 2 deletions src/rubrix/server/tasks/commons/dao/es_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def keyword_field(enable_text_search: bool = False):
"ignore_above": MAX_KEYWORD_LENGTH,
}
if enable_text_search:
mapping["fields"] = {"text": mappings.text_field()}
text_field = mappings.text_field()
text_field_fields = text_field.pop("fields", {})
mapping["fields"] = {"text": text_field, **text_field_fields}
return mapping

@staticmethod
Expand Down Expand Up @@ -137,7 +139,11 @@ def tasks_common_settings():


def dynamic_metrics_text():
return {"metrics.*": mappings.path_match_keyword_template(path="metrics.*")}
return {
"metrics.*": mappings.path_match_keyword_template(
path="metrics.*", enable_text_search_in_keywords=False
)
}


def dynamic_metadata_text():
Expand Down