search: improve with CompositeSuggestQueryParser #733
Annotations
4 errors
Python / Tests (3.9, postgresql14, opensearch2):
invenio_users_resources/services/users/config.py#L1
Black format check
--- /home/runner/work/invenio-users-resources/invenio-users-resources/invenio_users_resources/services/users/config.py 2024-12-09 08:16:10.817864+00:00
+++ /home/runner/work/invenio-users-resources/invenio-users-resources/invenio_users_resources/services/users/config.py 2024-12-09 08:18:49.324620+00:00
@@ -68,11 +68,16 @@
# The user search needs to be highly restricted to avoid leaking
# account information, hence do not edit here unless you are
# absolutely sure what you're doing.
suggest_parser_cls = CompositeSuggestQueryParser.factory(
tree_transformer_cls=SearchFieldTransformer,
- fields=["username^2", "email.keyword^2", "profile.full_name^3", "profile.affiliations"],
+ fields=[
+ "username^2",
+ "email.keyword^2",
+ "profile.full_name^3",
+ "profile.affiliations",
+ ],
# Only public emails because hidden emails are stored in email_hidden field.
allow_list=["username", "email"],
mapping={
"affiliation": "profile.affiliations",
"affiliations": "profile.affiliations",
|
Python / Tests (3.9, postgresql14, opensearch2)
Process completed with exit code 1.
|
Python / Tests (3.12, postgresql14, opensearch2):
invenio_users_resources/services/users/config.py#L1
Black format check
--- /home/runner/work/invenio-users-resources/invenio-users-resources/invenio_users_resources/services/users/config.py 2024-12-09 08:16:10.424418+00:00
+++ /home/runner/work/invenio-users-resources/invenio-users-resources/invenio_users_resources/services/users/config.py 2024-12-09 08:18:55.126489+00:00
@@ -68,11 +68,16 @@
# The user search needs to be highly restricted to avoid leaking
# account information, hence do not edit here unless you are
# absolutely sure what you're doing.
suggest_parser_cls = CompositeSuggestQueryParser.factory(
tree_transformer_cls=SearchFieldTransformer,
- fields=["username^2", "email.keyword^2", "profile.full_name^3", "profile.affiliations"],
+ fields=[
+ "username^2",
+ "email.keyword^2",
+ "profile.full_name^3",
+ "profile.affiliations",
+ ],
# Only public emails because hidden emails are stored in email_hidden field.
allow_list=["username", "email"],
mapping={
"affiliation": "profile.affiliations",
"affiliations": "profile.affiliations",
|
Python / Tests (3.12, postgresql14, opensearch2)
Process completed with exit code 1.
|