watson-developer-cloud / java-sdk

:1st_place_medal: Java SDK to use the IBM Watson services.
http://watson-developer-cloud.github.io/java-sdk/
Apache License 2.0
593 stars 532 forks source link

[discovery] Add Top Hits Aggregation #514

Closed maniax89 closed 7 years ago

maniax89 commented 7 years ago

Description

Feature Request: Add in the top_hits aggregation enum for a discovery QueryRequest . The spec can be found at http://www.ibm.com/watson/developercloud/doc/discovery/query-reference.shtml#aggregrations

Excerpt:

Returns the documents ranked by the score of the query or enrichment. Can be used with any query parameter or aggregation. This example returns the 10 top hits for a term aggregation.

Example:

term(enriched_text.concepts.text).top_hits(10)

Solution

When you open an issue for a feature request, please add as much detail as possible:

pbwilmot commented 7 years ago

I agree this would be very helpful