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 significant terms in tag cloud visualization #17770

Merged
merged 3 commits into from Apr 25, 2018

Conversation

timroes
Copy link
Contributor

@timroes timroes commented Apr 18, 2018

Resolves #9502

You can now use significant terms aggregation in tagcloud.

@timroes timroes added release_note:enhancement Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Feature:Tagcloud Tag cloud visualization feature v7.0.0 v6.3.0 labels Apr 18, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@timroes timroes removed the v6.3.0 label Apr 18, 2018
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@@ -92,7 +92,11 @@ export class TagCloudVisualization {
}

const data = response.tables[0];
this._bucketAgg = this._vis.aggs.find(agg => agg.type.name === 'terms');
if (this._vis.aggs.bySchemaName.segment) {
this._bucketAgg = this._vis.aggs.bySchemaName.segment[0];
Copy link
Member

Choose a reason for hiding this comment

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

this might throw, if segment doesn't have any elements ... maybe use lodash ?
this._bucketAgg = _.get(this, '_vis.aggs.bySchemaName.segment[0]', null)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@timroes timroes added the v6.4.0 label Apr 25, 2018
Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

LGTM

@timroes timroes merged commit ef86570 into elastic:master Apr 25, 2018
@timroes timroes deleted the tagcloud-sig-term branch April 25, 2018 12:34
timroes added a commit to timroes/kibana that referenced this pull request Apr 25, 2018
* Allow significant terms for tag cloud

* Fix request before terms aggregation has configured

* Check if at least one agg is in array
@jccq
Copy link

jccq commented Apr 25, 2018

significant term returns 2 values, the significance and the count they are both important. Would it be possible to have one on the size of the term and the other say on the hint on hoover?

@timroes
Copy link
Contributor Author

timroes commented Apr 25, 2018

@jccq Please feel free to open a feature request, to add tooltips to tag cloud in general. Currently Tagcloud doesn't show any tooltips, so the values could be shown (as in other charts) in a tooltip.

timroes added a commit that referenced this pull request Apr 25, 2018
* Allow significant terms for tag cloud

* Fix request before terms aggregation has configured

* Check if at least one agg is in array
@markharwood
Copy link
Contributor

Significant terms agg should really be used for structured fields only.
The new significant_text agg is targetted for use on text fields (note it is advisable to combine with the sampler agg to sample only the top-matching docs.) Consider also the de-dup feature in that agg which typically greatly improves the quality of results - example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Tagcloud Tag cloud visualization feature Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement v6.4.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants