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

add top_hit metric #7302

Merged
merged 46 commits into from
Jan 4, 2017
Merged

add top_hit metric #7302

merged 46 commits into from
Jan 4, 2017

Conversation

scampi
Copy link
Contributor

@scampi scampi commented May 26, 2016

close #6877

Display the first/last value of a field, for a set of documents sorted on some field (e.g., a date).

TODO

  • aggregation of multivalued field
  • object in array use case
  • use AggConfigResult.toString for displaying arrays in the metric vis

Test

Index

Create the weather index with the following mapping:

$ curl -XPUT 'http://localhost:9200/weather' -d '
{
   "mappings": {
      "Weather": {
         "properties": {
            "timestamp": {
               "type": "date",
               "format": "date_optional_time"
            },
            "location": {
               "index": "not_analyzed",
               "type": "string"
            }
         }
      }
   }
}
'

Data

Add a document at a time.

$ curl -XPOST 'http://localhost:9200/weather/Weather/' -d '
{
  "location": "France",
  "temperature": 28,
  "timestamp": "2016-05-26T21:22:18+01:00"
}
'
$ curl -XPOST 'http://localhost:9200/weather/Weather/' -d '
{
  "location": "France",
  "temperature": 23.5,
  "timestamp": "2016-05-26T22:59:04+01:00"
}
'

Visualization

We can see what is the latest recorded temperature in France by doing the following:

Create either a vertical bar or a data table:

  • add a Latest metric:
    • "Field": the field which value to display, here temperature
    • "Sort On": the field to sort the data on, here timestamp
  • add a terms bucket on the field location.

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@scampi scampi changed the title add top_hits aggregation add top_hits metric May 26, 2016
@panda01 panda01 self-assigned this Jun 9, 2016
@panda01
Copy link
Contributor

panda01 commented Jun 9, 2016

Jenkins, test it.

@scampi
Copy link
Contributor Author

scampi commented Jun 9, 2016

In the jenkins logs, it fails with the exception java.lang.IllegalArgumentException: unknown setting [es.path.conf] did you mean [path.conf]?. Do you know what that is ?

@scampi
Copy link
Contributor Author

scampi commented Jun 9, 2016

With this fix elastic/libesvm@e3fd2ca I am able to run tests on my machine. Thanks @spalger for the fix ;o)

@spalger
Copy link
Contributor

spalger commented Jun 9, 2016

jenkins, test it

@scampi
Copy link
Contributor Author

scampi commented Jun 10, 2016

jenkins, test it

@panda01
Copy link
Contributor

panda01 commented Jun 10, 2016

Only, we (elastic members) can trigger the tests.

@panda01
Copy link
Contributor

panda01 commented Jun 10, 2016

Jenkins, test it.

@panda01
Copy link
Contributor

panda01 commented Jun 10, 2016

So it seems that this doesn't work with nested fields, through (I believe) no fault of your own, I'm not really sure where to go to fix this either.
no-nested

@panda01
Copy link
Contributor

panda01 commented Jun 10, 2016

Some other images that helped me reach this conclusion.

screen shot 2016-06-10 at 2 26 51 pm
screen shot 2016-06-10 at 2 27 07 pm

@panda01
Copy link
Contributor

panda01 commented Jun 10, 2016

Also, I'm not a fan this implementation, it is IMO is a bit limiting. I feel like the top_hits agg has other uses and by you only limiting it to order: desc it becomes a latest.

I say we take this away and leave it as kind of a top_hits agg. As an extra we can add if you want to do latest here is how you do it.

@panda01
Copy link
Contributor

panda01 commented Jun 10, 2016

Hmm, also I don't think these tests are something you caused. By the time you come back around they should be good to go though.

@scampi
Copy link
Contributor Author

scampi commented Jun 11, 2016

Thanks for spotting the problem with nested fields.

As an extra we can add if you want to do latest here is how you do it.

I think there is something missing to your comment, since I don't understand that sentence as it is now.

@panda01
Copy link
Contributor

panda01 commented Jun 13, 2016

@scampi Nope, I just worded that poorly. What I mean to say is after you add this metric, and remove the limitation on order, you can add steps that people can follow in order to get the latest value.

@scampi
Copy link
Contributor Author

scampi commented Jun 14, 2016

@panda01 Sorry I am still confused...

Do you want me to provide a combobox with, e.g., two options (desc and asc), so that the order option is not hardcoded ?

Otherwise, can you clarify what those steps are ? For the issue #6877 I need to either sort by descending (or ascending for some use case?) order. From what I read in the sort options, the default sort does not do what is needed for this issue.

@panda01
Copy link
Contributor

panda01 commented Jun 14, 2016

Do you want me to provide a combobox with, e.g., two options (desc and asc), so that the order option is not hardcoded ?

Exactly this! Maybe radio boxes though since i hate select boxes.

@scampi
Copy link
Contributor Author

scampi commented Jun 14, 2016

@panda01 I added a select box for choosing the order instead of radio boxes. I thought it was best to be consistent with the rest of kibana, e.g., the terms bucket aggregation uses a select box for the order. I can revert though.

In addition, the sort field is now by default the time field associated to the index pattern, as I had forgotten it mentioned in the issue.

@scampi
Copy link
Contributor Author

scampi commented Jun 15, 2016

@panda01 there is anyway another issue about the select box #2130 (comment) where the cool ui-select is mentioned ;o)

@panda01
Copy link
Contributor

panda01 commented Jun 21, 2016

@scampi in regards to using chosen, I would say the normal select box is appropriate for now. I will check out your changes.


<select
name="order"
ng-model="agg.params.order"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this is a bit nitpicky of me, but I think the sort, and sort order should use the same property names, since they are dependent on one another, and I would hate for someone later to not realize that.

For instance you could call the sort field agg.params.sort.field and the order agg.params.sort.dir or something to that effect. but with that it's clear they're both dealing with the sort, no matter where it's put.

@scampi
Copy link
Contributor Author

scampi commented Jan 3, 2017

@ppisljar Regarding #7302 (comment) it seems that some documents don't have the memory field from what I saw locally. In your case, it would mean that the last before last has that field, but not the last one.

The last commits add the following:

  • added top hits metric to the heatmap.
  • fixed min/max of an array of values: it was returning infinity if all values were undefined/null.

Regarding that 2nd point, I would like to know if there is some default "zero" value. For example, if a field is missing:

  • if a string, then we'd return "N/A" or something set in the advanced settings
  • if a number, then we'd return "0" or "1" or something set in the advanced settings

The PR is now ready for review, but pending the answer to the previous question, some changes might be needed.

@ppisljar
Copy link
Member

ppisljar commented Jan 3, 2017

regarding second point it should probably behave the same as for non-array missing values ? @Bargs whats your opinion ?

@Bargs
Copy link
Contributor

Bargs commented Jan 3, 2017

Discover displays a - for any missing fields regardless of type, so I think we should do the same here to remain consistent.

@scampi
Copy link
Contributor Author

scampi commented Jan 3, 2017

ok then PR is ready ;o) I thought there was such a setting so I wanted to make sure

@ppisljar ppisljar merged commit 64a3e72 into elastic:master Jan 4, 2017
@ppisljar
Copy link
Member

ppisljar commented Jan 4, 2017

congrats scampi, this is a great PR and i am sure many are excited about finally having top hits in kibana!

elastic-jasper added a commit that referenced this pull request Jan 4, 2017
Backports PR #7302

**Commit 1:**
add top_hits aggregation

* Original sha: 22bab62
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-05-26T22:02:08Z

**Commit 2:**
support nested fields

* Original sha: 8aef2b8
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-11T14:57:35Z

**Commit 3:**
added choice of the order and select by default the index pattern associated time field

* Original sha: 9791ac5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-14T21:08:00Z

**Commit 4:**
improved parameters name and changed aggregation from latest to top to better reflect what this aggregation may accomplish

* Original sha: 692f41c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-22T20:32:12Z

**Commit 5:**
made variable a constant

* Original sha: 39cddab
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-01T22:42:13Z

**Commit 6:**
use shorter name for variable

* Original sha: c6494cc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-27T08:50:44Z

**Commit 7:**
prevent to sort terms on top_hits

* Original sha: b365ddc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-08-28T09:47:47Z

**Commit 8:**
Added the top_hits agg to line/pie/tile vis. Added support for function in prop_filter to allow more flexibility when filtering the list of values. The _term order is now the default ordering instead of _custom.

* Original sha: be44e90
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-09-19T14:53:48Z

**Commit 9:**
simplified tests

* Original sha: 43767f0
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T09:29:11Z

**Commit 10:**
changed as per code review

* Original sha: 53469d5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T21:49:36Z

**Commit 11:**
Top Hit should support all field types on the metric vis

* Original sha: 20be950
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:18:31Z

**Commit 12:**
renamed metric to top hit

* Original sha: 20cbb12
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:28:30Z

**Commit 13:**
check if there is any result from buckets

* Original sha: b99d6c7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-18T09:13:19Z

**Commit 14:**
support scripted fields

* Original sha: f79cdc1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-23T20:58:55Z

**Commit 15:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 82060ce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-01T09:47:19Z

**Commit 16:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 2577298
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-12T11:30:42Z

**Commit 17:**
- added logic for trying to get the field value from the source or from a
  doc_values field.
- added onlyAggregatable option for a field agg param to decide whether
  or not to retain only aggregatable fields.

* Original sha: 6a2bc01
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-13T12:34:10Z

**Commit 18:**
improved loops in getValuesAtPath method

* Original sha: 991864c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-16T10:10:28Z

**Commit 19:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: bc1c90a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-17T23:51:13Z

**Commit 20:**
do not try to get the doc_values field of an IP field

* Original sha: d697f11
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T00:49:34Z

**Commit 21:**
improved field tests on the onlyAggregatable option

* Original sha: c2249e5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T01:08:34Z

**Commit 22:**
use indexPattern.formatField to get all the values at a given path

* Original sha: f4200e1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:02:18Z

**Commit 23:**
do not show the analyzed warning

* Original sha: 2dda53d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:30:59Z

**Commit 24:**
support to sort on scripted field

* Original sha: eda9610
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:52:15Z

**Commit 25:**
corrected tests and rely on the field's formatter instead of trying to return a nice string

* Original sha: b465438
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-20T14:40:43Z

**Commit 26:**
do not rely on init_default_field_props to set the doc_values property

* Original sha: 19e2104
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-21T23:11:29Z

**Commit 27:**
added test for the doc_values property

* Original sha: fd323f3
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-23T10:04:16Z

**Commit 28:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: cfed72e
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T15:47:45Z

**Commit 29:**
- corrected source formatter
- add option to show/hide analyzed warning of a field

* Original sha: 3090182
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T22:40:14Z

**Commit 30:**
set the default value of the showAnalyzedWarning in fieldparam

* Original sha: 0d924fc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:29:46Z
@ppisljar
Copy link
Member

ppisljar commented Jan 4, 2017

the backport #9735 has some conflicts you'll need to resolve.

@Bargs
Copy link
Contributor

Bargs commented Jan 4, 2017

@scampi thanks for the great work on another giant PR! This is an awesome new metric, users are gonna love it.

@scampi scampi deleted the latest-value branch January 5, 2017 09:37
@scampi
Copy link
Contributor Author

scampi commented Jan 5, 2017

Thanks @Bargs and @ppisljar for your help on this ;o)

scampi added a commit to scampi/kibana that referenced this pull request Jan 6, 2017
Backports PR elastic#7302

**Commit 1:**
add top_hits aggregation

* Original sha: 22bab62
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-05-26T22:02:08Z

**Commit 2:**
support nested fields

* Original sha: 8aef2b8
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-11T14:57:35Z

**Commit 3:**
added choice of the order and select by default the index pattern associated time field

* Original sha: 9791ac5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-14T21:08:00Z

**Commit 4:**
improved parameters name and changed aggregation from latest to top to better reflect what this aggregation may accomplish

* Original sha: 692f41c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-22T20:32:12Z

**Commit 5:**
made variable a constant

* Original sha: 39cddab
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-01T22:42:13Z

**Commit 6:**
use shorter name for variable

* Original sha: c6494cc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-27T08:50:44Z

**Commit 7:**
prevent to sort terms on top_hits

* Original sha: b365ddc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-08-28T09:47:47Z

**Commit 8:**
Added the top_hits agg to line/pie/tile vis. Added support for function in prop_filter to allow more flexibility when filtering the list of values. The _term order is now the default ordering instead of _custom.

* Original sha: be44e90
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-09-19T14:53:48Z

**Commit 9:**
simplified tests

* Original sha: 43767f0
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T09:29:11Z

**Commit 10:**
changed as per code review

* Original sha: 53469d5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T21:49:36Z

**Commit 11:**
Top Hit should support all field types on the metric vis

* Original sha: 20be950
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:18:31Z

**Commit 12:**
renamed metric to top hit

* Original sha: 20cbb12
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:28:30Z

**Commit 13:**
check if there is any result from buckets

* Original sha: b99d6c7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-18T09:13:19Z

**Commit 14:**
support scripted fields

* Original sha: f79cdc1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-23T20:58:55Z

**Commit 15:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 82060ce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-01T09:47:19Z

**Commit 16:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 2577298
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-12T11:30:42Z

**Commit 17:**
- added logic for trying to get the field value from the source or from a
  doc_values field.
- added onlyAggregatable option for a field agg param to decide whether
  or not to retain only aggregatable fields.

* Original sha: 6a2bc01
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-13T12:34:10Z

**Commit 18:**
improved loops in getValuesAtPath method

* Original sha: 991864c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-16T10:10:28Z

**Commit 19:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: bc1c90a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-17T23:51:13Z

**Commit 20:**
do not try to get the doc_values field of an IP field

* Original sha: d697f11
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T00:49:34Z

**Commit 21:**
improved field tests on the onlyAggregatable option

* Original sha: c2249e5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T01:08:34Z

**Commit 22:**
use indexPattern.formatField to get all the values at a given path

* Original sha: f4200e1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:02:18Z

**Commit 23:**
do not show the analyzed warning

* Original sha: 2dda53d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:30:59Z

**Commit 24:**
support to sort on scripted field

* Original sha: eda9610
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:52:15Z

**Commit 25:**
corrected tests and rely on the field's formatter instead of trying to return a nice string

* Original sha: b465438
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-20T14:40:43Z

**Commit 26:**
do not rely on init_default_field_props to set the doc_values property

* Original sha: 19e2104
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-21T23:11:29Z

**Commit 27:**
added test for the doc_values property

* Original sha: fd323f3
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-23T10:04:16Z

**Commit 28:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: cfed72e
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T15:47:45Z

**Commit 29:**
- corrected source formatter
- add option to show/hide analyzed warning of a field

* Original sha: 3090182
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T22:40:14Z

**Commit 30:**
set the default value of the showAnalyzedWarning in fieldparam

* Original sha: 0d924fc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:29:46Z
@scampi scampi mentioned this pull request Jan 6, 2017
scampi added a commit to scampi/kibana that referenced this pull request Jan 10, 2017
Backports PR elastic#7302

**Commit 1:**
add top_hits aggregation

* Original sha: 22bab62
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-05-26T22:02:08Z

**Commit 2:**
support nested fields

* Original sha: 8aef2b8
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-11T14:57:35Z

**Commit 3:**
added choice of the order and select by default the index pattern associated time field

* Original sha: 9791ac5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-14T21:08:00Z

**Commit 4:**
improved parameters name and changed aggregation from latest to top to better reflect what this aggregation may accomplish

* Original sha: 692f41c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-22T20:32:12Z

**Commit 5:**
made variable a constant

* Original sha: 39cddab
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-01T22:42:13Z

**Commit 6:**
use shorter name for variable

* Original sha: c6494cc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-27T08:50:44Z

**Commit 7:**
prevent to sort terms on top_hits

* Original sha: b365ddc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-08-28T09:47:47Z

**Commit 8:**
Added the top_hits agg to line/pie/tile vis. Added support for function in prop_filter to allow more flexibility when filtering the list of values. The _term order is now the default ordering instead of _custom.

* Original sha: be44e90
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-09-19T14:53:48Z

**Commit 9:**
simplified tests

* Original sha: 43767f0
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T09:29:11Z

**Commit 10:**
changed as per code review

* Original sha: 53469d5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T21:49:36Z

**Commit 11:**
Top Hit should support all field types on the metric vis

* Original sha: 20be950
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:18:31Z

**Commit 12:**
renamed metric to top hit

* Original sha: 20cbb12
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:28:30Z

**Commit 13:**
check if there is any result from buckets

* Original sha: b99d6c7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-18T09:13:19Z

**Commit 14:**
support scripted fields

* Original sha: f79cdc1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-23T20:58:55Z

**Commit 15:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 82060ce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-01T09:47:19Z

**Commit 16:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 2577298
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-12T11:30:42Z

**Commit 17:**
- added logic for trying to get the field value from the source or from a
  doc_values field.
- added onlyAggregatable option for a field agg param to decide whether
  or not to retain only aggregatable fields.

* Original sha: 6a2bc01
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-13T12:34:10Z

**Commit 18:**
improved loops in getValuesAtPath method

* Original sha: 991864c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-16T10:10:28Z

**Commit 19:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: bc1c90a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-17T23:51:13Z

**Commit 20:**
do not try to get the doc_values field of an IP field

* Original sha: d697f11
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T00:49:34Z

**Commit 21:**
improved field tests on the onlyAggregatable option

* Original sha: c2249e5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T01:08:34Z

**Commit 22:**
use indexPattern.formatField to get all the values at a given path

* Original sha: f4200e1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:02:18Z

**Commit 23:**
do not show the analyzed warning

* Original sha: 2dda53d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:30:59Z

**Commit 24:**
support to sort on scripted field

* Original sha: eda9610
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:52:15Z

**Commit 25:**
corrected tests and rely on the field's formatter instead of trying to return a nice string

* Original sha: b465438
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-20T14:40:43Z

**Commit 26:**
do not rely on init_default_field_props to set the doc_values property

* Original sha: 19e2104
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-21T23:11:29Z

**Commit 27:**
added test for the doc_values property

* Original sha: fd323f3
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-23T10:04:16Z

**Commit 28:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: cfed72e
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T15:47:45Z

**Commit 29:**
- corrected source formatter
- add option to show/hide analyzed warning of a field

* Original sha: 3090182
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T22:40:14Z

**Commit 30:**
set the default value of the showAnalyzedWarning in fieldparam

* Original sha: 0d924fc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:29:46Z
scampi added a commit to scampi/kibana that referenced this pull request Jan 10, 2017
Backports PR elastic#7302

**Commit 1:**
add top_hits aggregation

* Original sha: 22bab62
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-05-26T22:02:08Z

**Commit 2:**
support nested fields

* Original sha: 8aef2b8
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-11T14:57:35Z

**Commit 3:**
added choice of the order and select by default the index pattern associated time field

* Original sha: 9791ac5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-14T21:08:00Z

**Commit 4:**
improved parameters name and changed aggregation from latest to top to better reflect what this aggregation may accomplish

* Original sha: 692f41c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-22T20:32:12Z

**Commit 5:**
made variable a constant

* Original sha: 39cddab
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-01T22:42:13Z

**Commit 6:**
use shorter name for variable

* Original sha: c6494cc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-27T08:50:44Z

**Commit 7:**
prevent to sort terms on top_hits

* Original sha: b365ddc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-08-28T09:47:47Z

**Commit 8:**
Added the top_hits agg to line/pie/tile vis. Added support for function in prop_filter to allow more flexibility when filtering the list of values. The _term order is now the default ordering instead of _custom.

* Original sha: be44e90
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-09-19T14:53:48Z

**Commit 9:**
simplified tests

* Original sha: 43767f0
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T09:29:11Z

**Commit 10:**
changed as per code review

* Original sha: 53469d5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T21:49:36Z

**Commit 11:**
Top Hit should support all field types on the metric vis

* Original sha: 20be950
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:18:31Z

**Commit 12:**
renamed metric to top hit

* Original sha: 20cbb12
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:28:30Z

**Commit 13:**
check if there is any result from buckets

* Original sha: b99d6c7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-18T09:13:19Z

**Commit 14:**
support scripted fields

* Original sha: f79cdc1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-23T20:58:55Z

**Commit 15:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 82060ce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-01T09:47:19Z

**Commit 16:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 2577298
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-12T11:30:42Z

**Commit 17:**
- added logic for trying to get the field value from the source or from a
  doc_values field.
- added onlyAggregatable option for a field agg param to decide whether
  or not to retain only aggregatable fields.

* Original sha: 6a2bc01
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-13T12:34:10Z

**Commit 18:**
improved loops in getValuesAtPath method

* Original sha: 991864c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-16T10:10:28Z

**Commit 19:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: bc1c90a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-17T23:51:13Z

**Commit 20:**
do not try to get the doc_values field of an IP field

* Original sha: d697f11
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T00:49:34Z

**Commit 21:**
improved field tests on the onlyAggregatable option

* Original sha: c2249e5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T01:08:34Z

**Commit 22:**
use indexPattern.formatField to get all the values at a given path

* Original sha: f4200e1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:02:18Z

**Commit 23:**
do not show the analyzed warning

* Original sha: 2dda53d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:30:59Z

**Commit 24:**
support to sort on scripted field

* Original sha: eda9610
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:52:15Z

**Commit 25:**
corrected tests and rely on the field's formatter instead of trying to return a nice string

* Original sha: b465438
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-20T14:40:43Z

**Commit 26:**
do not rely on init_default_field_props to set the doc_values property

* Original sha: 19e2104
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-21T23:11:29Z

**Commit 27:**
added test for the doc_values property

* Original sha: fd323f3
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-23T10:04:16Z

**Commit 28:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: cfed72e
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T15:47:45Z

**Commit 29:**
- corrected source formatter
- add option to show/hide analyzed warning of a field

* Original sha: 3090182
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T22:40:14Z

**Commit 30:**
set the default value of the showAnalyzedWarning in fieldparam

* Original sha: 0d924fc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:29:46Z
scampi added a commit to scampi/kibana that referenced this pull request Jan 10, 2017
Backports PR elastic#7302

**Commit 1:**
add top_hits aggregation

* Original sha: 22bab62
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-05-26T22:02:08Z

**Commit 2:**
support nested fields

* Original sha: 8aef2b8
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-11T14:57:35Z

**Commit 3:**
added choice of the order and select by default the index pattern associated time field

* Original sha: 9791ac5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-14T21:08:00Z

**Commit 4:**
improved parameters name and changed aggregation from latest to top to better reflect what this aggregation may accomplish

* Original sha: 692f41c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-22T20:32:12Z

**Commit 5:**
made variable a constant

* Original sha: 39cddab
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-01T22:42:13Z

**Commit 6:**
use shorter name for variable

* Original sha: c6494cc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-27T08:50:44Z

**Commit 7:**
prevent to sort terms on top_hits

* Original sha: b365ddc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-08-28T09:47:47Z

**Commit 8:**
Added the top_hits agg to line/pie/tile vis. Added support for function in prop_filter to allow more flexibility when filtering the list of values. The _term order is now the default ordering instead of _custom.

* Original sha: be44e90
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-09-19T14:53:48Z

**Commit 9:**
simplified tests

* Original sha: 43767f0
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T09:29:11Z

**Commit 10:**
changed as per code review

* Original sha: 53469d5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T21:49:36Z

**Commit 11:**
Top Hit should support all field types on the metric vis

* Original sha: 20be950
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:18:31Z

**Commit 12:**
renamed metric to top hit

* Original sha: 20cbb12
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:28:30Z

**Commit 13:**
check if there is any result from buckets

* Original sha: b99d6c7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-18T09:13:19Z

**Commit 14:**
support scripted fields

* Original sha: f79cdc1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-23T20:58:55Z

**Commit 15:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 82060ce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-01T09:47:19Z

**Commit 16:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 2577298
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-12T11:30:42Z

**Commit 17:**
- added logic for trying to get the field value from the source or from a
  doc_values field.
- added onlyAggregatable option for a field agg param to decide whether
  or not to retain only aggregatable fields.

* Original sha: 6a2bc01
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-13T12:34:10Z

**Commit 18:**
improved loops in getValuesAtPath method

* Original sha: 991864c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-16T10:10:28Z

**Commit 19:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: bc1c90a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-17T23:51:13Z

**Commit 20:**
do not try to get the doc_values field of an IP field

* Original sha: d697f11
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T00:49:34Z

**Commit 21:**
improved field tests on the onlyAggregatable option

* Original sha: c2249e5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T01:08:34Z

**Commit 22:**
use indexPattern.formatField to get all the values at a given path

* Original sha: f4200e1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:02:18Z

**Commit 23:**
do not show the analyzed warning

* Original sha: 2dda53d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:30:59Z

**Commit 24:**
support to sort on scripted field

* Original sha: eda9610
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:52:15Z

**Commit 25:**
corrected tests and rely on the field's formatter instead of trying to return a nice string

* Original sha: b465438
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-20T14:40:43Z

**Commit 26:**
do not rely on init_default_field_props to set the doc_values property

* Original sha: 19e2104
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-21T23:11:29Z

**Commit 27:**
added test for the doc_values property

* Original sha: fd323f3
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-23T10:04:16Z

**Commit 28:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: cfed72e
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T15:47:45Z

**Commit 29:**
- corrected source formatter
- add option to show/hide analyzed warning of a field

* Original sha: 3090182
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T22:40:14Z

**Commit 30:**
set the default value of the showAnalyzedWarning in fieldparam

* Original sha: 0d924fc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:29:46Z
scampi added a commit to scampi/kibana that referenced this pull request Jan 10, 2017
Backports PR elastic#7302

**Commit 1:**
add top_hits aggregation

* Original sha: 22bab62
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-05-26T22:02:08Z

**Commit 2:**
support nested fields

* Original sha: 8aef2b8
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-11T14:57:35Z

**Commit 3:**
added choice of the order and select by default the index pattern associated time field

* Original sha: 9791ac5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-14T21:08:00Z

**Commit 4:**
improved parameters name and changed aggregation from latest to top to better reflect what this aggregation may accomplish

* Original sha: 692f41c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-22T20:32:12Z

**Commit 5:**
made variable a constant

* Original sha: 39cddab
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-01T22:42:13Z

**Commit 6:**
use shorter name for variable

* Original sha: c6494cc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-27T08:50:44Z

**Commit 7:**
prevent to sort terms on top_hits

* Original sha: b365ddc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-08-28T09:47:47Z

**Commit 8:**
Added the top_hits agg to line/pie/tile vis. Added support for function in prop_filter to allow more flexibility when filtering the list of values. The _term order is now the default ordering instead of _custom.

* Original sha: be44e90
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-09-19T14:53:48Z

**Commit 9:**
simplified tests

* Original sha: 43767f0
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T09:29:11Z

**Commit 10:**
changed as per code review

* Original sha: 53469d5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T21:49:36Z

**Commit 11:**
Top Hit should support all field types on the metric vis

* Original sha: 20be950
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:18:31Z

**Commit 12:**
renamed metric to top hit

* Original sha: 20cbb12
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:28:30Z

**Commit 13:**
check if there is any result from buckets

* Original sha: b99d6c7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-18T09:13:19Z

**Commit 14:**
support scripted fields

* Original sha: f79cdc1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-23T20:58:55Z

**Commit 15:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 82060ce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-01T09:47:19Z

**Commit 16:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 2577298
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-12T11:30:42Z

**Commit 17:**
- added logic for trying to get the field value from the source or from a
  doc_values field.
- added onlyAggregatable option for a field agg param to decide whether
  or not to retain only aggregatable fields.

* Original sha: 6a2bc01
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-13T12:34:10Z

**Commit 18:**
improved loops in getValuesAtPath method

* Original sha: 991864c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-16T10:10:28Z

**Commit 19:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: bc1c90a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-17T23:51:13Z

**Commit 20:**
do not try to get the doc_values field of an IP field

* Original sha: d697f11
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T00:49:34Z

**Commit 21:**
improved field tests on the onlyAggregatable option

* Original sha: c2249e5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T01:08:34Z

**Commit 22:**
use indexPattern.formatField to get all the values at a given path

* Original sha: f4200e1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:02:18Z

**Commit 23:**
do not show the analyzed warning

* Original sha: 2dda53d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:30:59Z

**Commit 24:**
support to sort on scripted field

* Original sha: eda9610
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:52:15Z

**Commit 25:**
corrected tests and rely on the field's formatter instead of trying to return a nice string

* Original sha: b465438
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-20T14:40:43Z

**Commit 26:**
do not rely on init_default_field_props to set the doc_values property

* Original sha: 19e2104
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-21T23:11:29Z

**Commit 27:**
added test for the doc_values property

* Original sha: fd323f3
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-23T10:04:16Z

**Commit 28:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: cfed72e
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T15:47:45Z

**Commit 29:**
- corrected source formatter
- add option to show/hide analyzed warning of a field

* Original sha: 3090182
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T22:40:14Z

**Commit 30:**
set the default value of the showAnalyzedWarning in fieldparam

* Original sha: 0d924fc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:29:46Z

**Commit 31:**
added description of the showAnalyzedWarning option

* Original sha: 7f85803
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:39:07Z

**Commit 32:**
use aggParam object to access the options of the field parameter

* Original sha: ef95ceb
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-09T10:54:51Z

**Commit 33:**
flattenHit: support object in array

* Original sha: b64f92a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-10T23:36:45Z

**Commit 34:**
added aggregation option to support multivalued fields and top_hits aggregation with a size different than 1

* Original sha: e18a30d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T13:49:17Z

**Commit 35:**
disable concatenate aggregation type for visualizations other than table and metric

* Original sha: 2a2fa67
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T15:00:08Z

**Commit 36:**
corrected display of arrays in the metric vis

* Original sha: eb70e84
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T15:27:36Z

**Commit 37:**
removed condition on the IP field type when retrieving doc values

* Original sha: d19ba56
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T21:30:47Z

**Commit 38:**
- do not set a default value for the aggregate with property since it is

* Original sha: 66d3b31
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-21T23:04:12Z

**Commit 39:**
filter out incompatble aggregate options and auto select the option if there is only one

* Original sha: 1bd4727
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-28T17:14:21Z

**Commit 40:**
simplified condition

* Original sha: 5babf9a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-28T23:49:46Z

**Commit 41:**
lint

* Original sha: 7372fce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-30T19:43:08Z

**Commit 42:**
fix min/max/sum/average aggregate of elements having only null/undefined values

* Original sha: 0791be7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2017-01-03T10:40:16Z

**Commit 43:**
added top_hits metric to heatmap visualization

* Original sha: c967a23
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2017-01-03T11:16:56Z
@scampi scampi mentioned this pull request Jan 10, 2017
scampi added a commit to scampi/kibana that referenced this pull request Jan 11, 2017
Backports PR elastic#7302

**Commit 1:**
add top_hits aggregation

* Original sha: 22bab62
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-05-26T22:02:08Z

**Commit 2:**
support nested fields

* Original sha: 8aef2b8
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-11T14:57:35Z

**Commit 3:**
added choice of the order and select by default the index pattern associated time field

* Original sha: 9791ac5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-14T21:08:00Z

**Commit 4:**
improved parameters name and changed aggregation from latest to top to better reflect what this aggregation may accomplish

* Original sha: 692f41c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-22T20:32:12Z

**Commit 5:**
made variable a constant

* Original sha: 39cddab
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-01T22:42:13Z

**Commit 6:**
use shorter name for variable

* Original sha: c6494cc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-27T08:50:44Z

**Commit 7:**
prevent to sort terms on top_hits

* Original sha: b365ddc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-08-28T09:47:47Z

**Commit 8:**
Added the top_hits agg to line/pie/tile vis. Added support for function in prop_filter to allow more flexibility when filtering the list of values. The _term order is now the default ordering instead of _custom.

* Original sha: be44e90
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-09-19T14:53:48Z

**Commit 9:**
simplified tests

* Original sha: 43767f0
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T09:29:11Z

**Commit 10:**
changed as per code review

* Original sha: 53469d5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T21:49:36Z

**Commit 11:**
Top Hit should support all field types on the metric vis

* Original sha: 20be950
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:18:31Z

**Commit 12:**
renamed metric to top hit

* Original sha: 20cbb12
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:28:30Z

**Commit 13:**
check if there is any result from buckets

* Original sha: b99d6c7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-18T09:13:19Z

**Commit 14:**
support scripted fields

* Original sha: f79cdc1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-23T20:58:55Z

**Commit 15:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 82060ce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-01T09:47:19Z

**Commit 16:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 2577298
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-12T11:30:42Z

**Commit 17:**
- added logic for trying to get the field value from the source or from a
  doc_values field.
- added onlyAggregatable option for a field agg param to decide whether
  or not to retain only aggregatable fields.

* Original sha: 6a2bc01
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-13T12:34:10Z

**Commit 18:**
improved loops in getValuesAtPath method

* Original sha: 991864c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-16T10:10:28Z

**Commit 19:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: bc1c90a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-17T23:51:13Z

**Commit 20:**
do not try to get the doc_values field of an IP field

* Original sha: d697f11
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T00:49:34Z

**Commit 21:**
improved field tests on the onlyAggregatable option

* Original sha: c2249e5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T01:08:34Z

**Commit 22:**
use indexPattern.formatField to get all the values at a given path

* Original sha: f4200e1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:02:18Z

**Commit 23:**
do not show the analyzed warning

* Original sha: 2dda53d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:30:59Z

**Commit 24:**
support to sort on scripted field

* Original sha: eda9610
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:52:15Z

**Commit 25:**
corrected tests and rely on the field's formatter instead of trying to return a nice string

* Original sha: b465438
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-20T14:40:43Z

**Commit 26:**
do not rely on init_default_field_props to set the doc_values property

* Original sha: 19e2104
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-21T23:11:29Z

**Commit 27:**
added test for the doc_values property

* Original sha: fd323f3
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-23T10:04:16Z

**Commit 28:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: cfed72e
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T15:47:45Z

**Commit 29:**
- corrected source formatter
- add option to show/hide analyzed warning of a field

* Original sha: 3090182
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T22:40:14Z

**Commit 30:**
set the default value of the showAnalyzedWarning in fieldparam

* Original sha: 0d924fc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:29:46Z

**Commit 31:**
added description of the showAnalyzedWarning option

* Original sha: 7f85803
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:39:07Z

**Commit 32:**
use aggParam object to access the options of the field parameter

* Original sha: ef95ceb
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-09T10:54:51Z

**Commit 33:**
flattenHit: support object in array

* Original sha: b64f92a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-10T23:36:45Z

**Commit 34:**
added aggregation option to support multivalued fields and top_hits aggregation with a size different than 1

* Original sha: e18a30d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T13:49:17Z

**Commit 35:**
disable concatenate aggregation type for visualizations other than table and metric

* Original sha: 2a2fa67
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T15:00:08Z

**Commit 36:**
corrected display of arrays in the metric vis

* Original sha: eb70e84
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T15:27:36Z

**Commit 37:**
removed condition on the IP field type when retrieving doc values

* Original sha: d19ba56
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T21:30:47Z

**Commit 38:**
- do not set a default value for the aggregate with property since it is

* Original sha: 66d3b31
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-21T23:04:12Z

**Commit 39:**
filter out incompatble aggregate options and auto select the option if there is only one

* Original sha: 1bd4727
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-28T17:14:21Z

**Commit 40:**
simplified condition

* Original sha: 5babf9a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-28T23:49:46Z

**Commit 41:**
lint

* Original sha: 7372fce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-30T19:43:08Z

**Commit 42:**
fix min/max/sum/average aggregate of elements having only null/undefined values

* Original sha: 0791be7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2017-01-03T10:40:16Z

**Commit 43:**
added top_hits metric to heatmap visualization

* Original sha: c967a23
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2017-01-03T11:16:56Z
ppisljar pushed a commit that referenced this pull request Jan 11, 2017
Backports PR #7302

**Commit 1:**
add top_hits aggregation

* Original sha: 22bab62
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-05-26T22:02:08Z

**Commit 2:**
support nested fields

* Original sha: 8aef2b8
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-11T14:57:35Z

**Commit 3:**
added choice of the order and select by default the index pattern associated time field

* Original sha: 9791ac5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-14T21:08:00Z

**Commit 4:**
improved parameters name and changed aggregation from latest to top to better reflect what this aggregation may accomplish

* Original sha: 692f41c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-06-22T20:32:12Z

**Commit 5:**
made variable a constant

* Original sha: 39cddab
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-01T22:42:13Z

**Commit 6:**
use shorter name for variable

* Original sha: c6494cc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-07-27T08:50:44Z

**Commit 7:**
prevent to sort terms on top_hits

* Original sha: b365ddc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-08-28T09:47:47Z

**Commit 8:**
Added the top_hits agg to line/pie/tile vis. Added support for function in prop_filter to allow more flexibility when filtering the list of values. The _term order is now the default ordering instead of _custom.

* Original sha: be44e90
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-09-19T14:53:48Z

**Commit 9:**
simplified tests

* Original sha: 43767f0
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T09:29:11Z

**Commit 10:**
changed as per code review

* Original sha: 53469d5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-11T21:49:36Z

**Commit 11:**
Top Hit should support all field types on the metric vis

* Original sha: 20be950
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:18:31Z

**Commit 12:**
renamed metric to top hit

* Original sha: 20cbb12
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-17T21:28:30Z

**Commit 13:**
check if there is any result from buckets

* Original sha: b99d6c7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-18T09:13:19Z

**Commit 14:**
support scripted fields

* Original sha: f79cdc1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-10-23T20:58:55Z

**Commit 15:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 82060ce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-01T09:47:19Z

**Commit 16:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: 2577298
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-12T11:30:42Z

**Commit 17:**
- added logic for trying to get the field value from the source or from a
  doc_values field.
- added onlyAggregatable option for a field agg param to decide whether
  or not to retain only aggregatable fields.

* Original sha: 6a2bc01
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-13T12:34:10Z

**Commit 18:**
improved loops in getValuesAtPath method

* Original sha: 991864c
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-16T10:10:28Z

**Commit 19:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: bc1c90a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-17T23:51:13Z

**Commit 20:**
do not try to get the doc_values field of an IP field

* Original sha: d697f11
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T00:49:34Z

**Commit 21:**
improved field tests on the onlyAggregatable option

* Original sha: c2249e5
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-18T01:08:34Z

**Commit 22:**
use indexPattern.formatField to get all the values at a given path

* Original sha: f4200e1
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:02:18Z

**Commit 23:**
do not show the analyzed warning

* Original sha: 2dda53d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:30:59Z

**Commit 24:**
support to sort on scripted field

* Original sha: eda9610
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-19T23:52:15Z

**Commit 25:**
corrected tests and rely on the field's formatter instead of trying to return a nice string

* Original sha: b465438
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-20T14:40:43Z

**Commit 26:**
do not rely on init_default_field_props to set the doc_values property

* Original sha: 19e2104
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-21T23:11:29Z

**Commit 27:**
added test for the doc_values property

* Original sha: fd323f3
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-11-23T10:04:16Z

**Commit 28:**
Merge branch 'master' of github.com:elastic/kibana into latest-value

* Original sha: cfed72e
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T15:47:45Z

**Commit 29:**
- corrected source formatter
- add option to show/hide analyzed warning of a field

* Original sha: 3090182
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-05T22:40:14Z

**Commit 30:**
set the default value of the showAnalyzedWarning in fieldparam

* Original sha: 0d924fc
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:29:46Z

**Commit 31:**
added description of the showAnalyzedWarning option

* Original sha: 7f85803
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-08T16:39:07Z

**Commit 32:**
use aggParam object to access the options of the field parameter

* Original sha: ef95ceb
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-09T10:54:51Z

**Commit 33:**
flattenHit: support object in array

* Original sha: b64f92a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-10T23:36:45Z

**Commit 34:**
added aggregation option to support multivalued fields and top_hits aggregation with a size different than 1

* Original sha: e18a30d
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T13:49:17Z

**Commit 35:**
disable concatenate aggregation type for visualizations other than table and metric

* Original sha: 2a2fa67
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T15:00:08Z

**Commit 36:**
corrected display of arrays in the metric vis

* Original sha: eb70e84
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T15:27:36Z

**Commit 37:**
removed condition on the IP field type when retrieving doc values

* Original sha: d19ba56
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-17T21:30:47Z

**Commit 38:**
- do not set a default value for the aggregate with property since it is

* Original sha: 66d3b31
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-21T23:04:12Z

**Commit 39:**
filter out incompatble aggregate options and auto select the option if there is only one

* Original sha: 1bd4727
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-28T17:14:21Z

**Commit 40:**
simplified condition

* Original sha: 5babf9a
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-28T23:49:46Z

**Commit 41:**
lint

* Original sha: 7372fce
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2016-12-30T19:43:08Z

**Commit 42:**
fix min/max/sum/average aggregate of elements having only null/undefined values

* Original sha: 0791be7
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2017-01-03T10:40:16Z

**Commit 43:**
added top_hits metric to heatmap visualization

* Original sha: c967a23
* Authored by Stéphane Campinas <stephane.campinas@gmail.com> on 2017-01-03T11:16:56Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement v5.3.0 v6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Latest" metric agg
9 participants