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

[backport] PR #8421 to 5.0 #8462

Merged
merged 1 commit into from
Sep 23, 2016
Merged

[backport] PR #8421 to 5.0 #8462

merged 1 commit into from
Sep 23, 2016

Conversation

elastic-jasper
Copy link
Contributor

Backport PR #8421

Commit 1:
Add field_capabilities API

This adds a simple API for getting the searchable/aggregatable status of
a list of fields in a given index, list of indices, or index pattern. In
the future this will probably evolve into a full blown fields info API
that we can use when removing the index pattern mapping cache. For now
though it's built to provide the minimum info needed to fix
#6769

Usage:

The API exposes a single GET endpoint.

GET /api/kibana/{indices}/field_capabilities

indices can be a single index, a comma delimited list, or a wildcard
pattern

Example response:

{
  "fields": {
    "imsearchable": {
      "searchable": true,
      "aggregatable": false
    },
    "imaggregatable": {
      "searchable": true,
      "aggregatable": true
    },
  }
}

Commit 2:
Filter non-aggregatable fields from vis editor UI

Using the field_capabilities API added in the previous commit, this commit enhances
the client side index pattern object with information about the
searchable and aggregatable status of each field in the index pattern.
We then use this information to filter out non-aggregatable fields from
the vis editor so that users won't accidentally select them and get
nasty errors. An example of a non-aggregatable field would be a text
field without fielddata enabled (which is the default).

I also added the searchable and aggregatable flags to the index pattern
page so users can see the status of their fields. I removed the indexed
column because it was mostly redundant with searchable and I needed
the horizontal space.

The addition of the searchable and aggregatable properties for index
pattern fields would require users to manually refresh their field list
when upgrading to 5.0. This commit also adds a check for those properties and
if they're missing it automatically refreshes the field list for the
user in a seamless manner.

---------

**Commit 1:**
Add field_capabilities API

This adds a simple API for getting the searchable/aggregatable status of
a list of fields in a given index, list of indices, or index pattern. In
the future this will probably evolve into a full blown fields info API
that we can use when removing the index pattern mapping cache. For now
though it's built to provide the minimum info needed to fix
#6769

Usage:

The API exposes a single GET endpoint.

```
GET /api/kibana/{indices}/field_capabilities
```

`indices` can be a single index, a comma delimited list, or a wildcard
pattern

Example response:

```
{
  "fields": {
    "imsearchable": {
      "searchable": true,
      "aggregatable": false
    },
    "imaggregatable": {
      "searchable": true,
      "aggregatable": true
    },
  }
}
```

* Original sha: 1af6b76
* Authored by Matthew Bargar <[email protected]> on 2016-09-21T18:38:34Z

**Commit 2:**
Filter non-aggregatable fields from vis editor UI

Using the field_capabilities API added in the previous commit, this commit enhances
the client side index pattern object with information about the
searchable and aggregatable status of each field in the index pattern.
We then use this information to filter out non-aggregatable fields from
the vis editor so that users won't accidentally select them and get
nasty errors. An example of a non-aggregatable field would be a `text`
field without fielddata enabled (which is the default).

I also added the searchable and aggregatable flags to the index pattern
page so users can see the status of their fields. I removed the `indexed`
column because it was mostly redundant with `searchable` and I needed
the horizontal space.

The addition of the searchable and aggregatable properties for index
pattern fields would require users to manually refresh their field list
when upgrading to 5.0. This commit also adds a check for those properties and
if they're missing it automatically refreshes the field list for the
user in a seamless manner.

* Original sha: 4a906f3
* Authored by Matthew Bargar <[email protected]> on 2016-09-21T19:18:10Z
@Bargs Bargs merged commit 49e858d into 5.0 Sep 23, 2016
@epixa epixa deleted the jasper/backport/8421/5.0 branch September 27, 2016 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants