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

fix search fields #18014

Merged
merged 1 commit into from
Apr 13, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def search(self, search_text, **kwargs):
scoring_parameters = kwargs.pop("scoring_parameters", None)
scoring_profile = kwargs.pop("scoring_profile", None)
search_fields = kwargs.pop("search_fields", None)
search_fields_str = ",".join(search_fields) if search_fields else None
search_mode = kwargs.pop("search_mode", None)
query_language = kwargs.pop("query_language", None)
speller = kwargs.pop("speller", None)
Expand All @@ -262,7 +263,7 @@ def search(self, search_text, **kwargs):
query_type=query_type,
scoring_parameters=scoring_parameters,
scoring_profile=scoring_profile,
search_fields=search_fields,
search_fields=search_fields_str,
search_mode=search_mode,
query_language=query_language,
speller=speller,
Expand Down Expand Up @@ -333,6 +334,7 @@ def suggest(self, search_text, suggester_name, **kwargs):
minimum_coverage = kwargs.pop("minimum_coverage", None)
order_by = kwargs.pop("order_by", None)
search_fields = kwargs.pop("search_fields", None)
search_fields_str = ",".join(search_fields) if search_fields else None
select = kwargs.pop("select", None)
top = kwargs.pop("top", None)
query = SuggestQuery(
Expand All @@ -344,7 +346,7 @@ def suggest(self, search_text, suggester_name, **kwargs):
highlight_pre_tag=highlight_pre_tag,
minimum_coverage=minimum_coverage,
order_by=order_by,
search_fields=search_fields,
search_fields=search_fields_str,
select=select if isinstance(select, six.string_types) else None,
top=top
)
Expand Down Expand Up @@ -406,6 +408,7 @@ def autocomplete(self, search_text, suggester_name, **kwargs):
highlight_pre_tag = kwargs.pop("highlight_pre_tag", None)
minimum_coverage = kwargs.pop("minimum_coverage", None)
search_fields = kwargs.pop("search_fields", None)
search_fields_str = ",".join(search_fields) if search_fields else None
top = kwargs.pop("top", None)
query = AutocompleteQuery(
search_text=search_text,
Expand All @@ -416,7 +419,7 @@ def autocomplete(self, search_text, suggester_name, **kwargs):
highlight_post_tag=highlight_post_tag,
highlight_pre_tag=highlight_pre_tag,
minimum_coverage=minimum_coverage,
search_fields=search_fields,
search_fields=search_fields_str,
top=top
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ async def search(self, search_text, **kwargs):
scoring_parameters = kwargs.pop("scoring_parameters", None)
scoring_profile = kwargs.pop("scoring_profile", None)
search_fields = kwargs.pop("search_fields", None)
search_fields_str = ",".join(search_fields) if search_fields else None
search_mode = kwargs.pop("search_mode", None)
query_language = kwargs.pop("query_language", None)
speller = kwargs.pop("speller", None)
Expand All @@ -236,7 +237,7 @@ async def search(self, search_text, **kwargs):
query_type=query_type,
scoring_parameters=scoring_parameters,
scoring_profile=scoring_profile,
search_fields=search_fields,
search_fields=search_fields_str,
search_mode=search_mode,
query_language=query_language,
speller=speller,
Expand Down Expand Up @@ -306,6 +307,7 @@ async def suggest(self, search_text, suggester_name, **kwargs):
minimum_coverage = kwargs.pop("minimum_coverage", None)
order_by = kwargs.pop("order_by", None)
search_fields = kwargs.pop("search_fields", None)
search_fields_str = ",".join(search_fields) if search_fields else None
select = kwargs.pop("select", None)
top = kwargs.pop("top", None)
query = SuggestQuery(
Expand All @@ -317,7 +319,7 @@ async def suggest(self, search_text, suggester_name, **kwargs):
highlight_pre_tag=highlight_pre_tag,
minimum_coverage=minimum_coverage,
order_by=order_by,
search_fields=search_fields,
search_fields=search_fields_str,
select=select if isinstance(select, six.string_types) else None,
top=top
)
Expand Down Expand Up @@ -379,6 +381,7 @@ async def autocomplete(self, search_text, suggester_name, **kwargs):
highlight_pre_tag = kwargs.pop("highlight_pre_tag", None)
minimum_coverage = kwargs.pop("minimum_coverage", None)
search_fields = kwargs.pop("search_fields", None)
search_fields_str = ",".join(search_fields) if search_fields else None
top = kwargs.pop("top", None)
query = AutocompleteQuery(
search_text=search_text,
Expand All @@ -389,7 +392,7 @@ async def autocomplete(self, search_text, suggester_name, **kwargs):
highlight_post_tag=highlight_post_tag,
highlight_pre_tag=highlight_pre_tag,
minimum_coverage=minimum_coverage,
search_fields=search_fields,
search_fields=search_fields_str,
top=top
)

Expand Down