Use the "size" parameter. e.g.
$ curl -XGET 'http://localhost:9200/twitter/tweet/_search' -d '{ "size": "200", "aggregations": { "my_agg": { "terms": { "field": "text" } } } } ' On Thursday, August 14, 2014 2:59:52 AM UTC-7, julie dabbs wrote: > > No, I have a query with aggregations that can yield thousands of results > back to the user. I want to only show the top say 200 hits and not this > huge number but keeping the > integrity of the data. i.e showing the results with the highest scores > > On Thursday, August 14, 2014 10:04:25 AM UTC+1, Isabel Drost-Fromm wrote: >> >> On Thu, Aug 14, 2014 at 10:31 AM, julie dabbs <[email protected]> >> wrote: >> >>> Does anyone know how to execute a query with aggregations and once the >>> query is complete only show the top 100 hits in a browser. >>> If I use filter limit I am not getting the best results. If I use still >>> am displaying a ridiculous total hits back to the user. I am running on >>> version >>> 1.3. Can anyone help >>> >>> >> Not sure if I understood your question correctly. Are you looking for a >> way to implement pagination through results? Then the following might be >> helpful: >> >> >> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-from-size.html#search-request-from-size >> >> >> Isabel >> >> >> -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ea13194c-c364-47c5-b9db-44066aa2470d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
