The Wayback Machine - https://web.archive.org/web/20221031151657/https://github.com/elastic/elasticsearch/issues/83363
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

Search Template API Explain Query String Argument Ignored #83363

Open
stevejgordon opened this issue Feb 1, 2022 · 6 comments
Open

Search Template API Explain Query String Argument Ignored #83363

stevejgordon opened this issue Feb 1, 2022 · 6 comments
Labels
>bug good first issue low hanging fruit help wanted adoptme :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Comments

@stevejgordon
Copy link
Contributor

stevejgordon commented Feb 1, 2022

Elasticsearch Version

7.16.3

Installed Plugins

No response

Java Version

bundled

OS Version

Windows 10

Problem Description

I'm looking into a report of a bug raised against the .NET client for use of search templates. The root cause seems to be that while the REST API spec and docs mention that "explain" can be included on the query string, doing so doesn't result in an explanation being returned. Only if it's included in the body is the explanation returned. This appears to be a bug with the parsing of search template rest requests as the explain parameter is not retrieved.

Steps to Reproduce

Make a request with "explain=true" on the query string:

GET test/_search/template?explain=true
{
 "id": "my-search-template",
 "params": {
    "query_string": "hello world",
    "from": 0,
    "size": 10
  }
}

Expected result:
The explanation is included in the results.

Actual:
The explanation is not included.

Logs (if relevant)

No response

@romseygeek romseygeek added the :Search/Search Search-related issues that do not fall into other categories label Feb 1, 2022
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Feb 1, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 1, 2022

Pinging @elastic/es-search (Team:Search)

@romseygeek romseygeek removed Team:Search Meta label for search team needs:triage labels Feb 1, 2022
@javanna javanna added Team:Search Meta label for search team good first issue low hanging fruit help wanted adoptme labels Feb 9, 2022
@zembrzuski
Copy link
Contributor

zembrzuski commented Feb 11, 2022

It seems that nobody is working on this issue yet. I'll give it a try.

@zembrzuski
Copy link
Contributor

zembrzuski commented Feb 14, 2022

Hi, just to keep you guys posted: I am already working in a PR to address this issue. I expect to raise a PR tomorrow. Thanks!

@zembrzuski
Copy link
Contributor

zembrzuski commented Feb 15, 2022

Hi @javanna
I have just raised a PR to address this issue.
I hope it is on track to get merged. Thanks!

@chen-ni
Copy link
Contributor

chen-ni commented Jul 13, 2022

Hi @zembrzuski, are you still working on this? If not then I'd like to pick this up :)

@1997sanket
Copy link

1997sanket commented Oct 18, 2022

Hi, @zembrzuski is your PR merged? I am new here and want to contribute.

Labels
>bug good first issue low hanging fruit help wanted adoptme :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

7 participants