Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ChEMBL
C
ChEMBL
Main Web Interface
Elasticsearch Proxy API
Commits
42265975
Commit
42265975
authored
Sep 27, 2021
by
David Mendez
Browse files
Eubopen: include current responses in entity suggestions
parent
76e6f2d5
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
app/eubopen/search/suggestions/suggestions.py
app/eubopen/search/suggestions/suggestions.py
+5
-3
No files found.
app/eubopen/search/suggestions/suggestions.py
View file @
42265975
...
...
@@ -12,13 +12,15 @@ def get_suggestions_for_term(term):
"""
autocomplete_config
=
RUN_CONFIG
.
get
(
'eubopen'
,
{}).
get
(
'search'
,
{}).
get
(
'suggestions'
,
{}).
get
(
'entities'
,
{})
all
_suggestions
=
{}
entity
_suggestions
=
{}
for
entity_key
,
entity_config
in
autocomplete_config
.
items
():
entity_suggestions
=
get_suggestions
(
term
,
entity_config
)
all
_suggestions
[
entity_key
]
=
entity_suggestions
entity
_suggestions
[
entity_key
]
=
entity_suggestions
return
all_suggestions
return
{
'entity_suggestions'
:
entity_suggestions
,
}
def
get_suggestions
(
term
,
entity_config
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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