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

Improve endpoint to obtain models with response filtering #141

Open
jettro opened this issue Mar 9, 2018 · 0 comments
Open

Improve endpoint to obtain models with response filtering #141

jettro opened this issue Mar 9, 2018 · 0 comments

Comments

@jettro
Copy link
Collaborator

jettro commented Mar 9, 2018

In a normal search request there is an option to filter the returned fields using:

  "_source": {
    "includes": [
      "field1",
      "field2"
    ]
  }

For a tool I would like to get a list of available models, but I do not need the complete response. I would like to obtain the name and model.type. It would be very interesting if we could do something like this.

GET _ltr/_model
{
  "_source": {
    "includes": [
      "name",
      "model.type"
    ]
  }
}

As mentioned by @nomoa on slack, there is an alternative:

curl 'localhost:9200/.ltrstore/_search?q=type:model&_source_include=model.name,model.model.type'

However, with this you have to know the index. Would be nice if we could use the existing endpoint for models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants