Limiting query results

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

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4ce06c6d-8a68-42d3-917e-ea4f68521f09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

On Thu, Aug 14, 2014 at 10:31 AM, julie dabbs julie.e.dabbs@gmail.com
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:

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAFSgB-DpHZ7b_EqZ3v-xnJdVR8jXbhaHeJ%3D9yrAjLvGR7LfTow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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 <julie....@gmail.com
<javascript:>> 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:

Elasticsearch Platform — Find real-time answers at scale | Elastic

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b631fa1d-1488-49d3-bcc5-35db67dd6bd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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 julie....@gmail.com
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:

Elasticsearch Platform — Find real-time answers at scale | Elastic

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 elasticsearch+unsubscribe@googlegroups.com.
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.

Unfortunately this does not change the total of results returned

On Thursday, August 14, 2014 9:31:12 AM UTC+1, julie dabbs 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

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a8845fd7-5c2a-4853-a168-70e54cece5c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I think an example (trimmed to the relevant parts) of the query you are
sending, the results you get and the results you expect would help ...

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAFSgB-C163S%2Bxwan6SP7C1YZJ-LVTSfRfXz_tb9%2Bd5bS7%2BTvPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Try something like that...

"aggs": {
"agg_name": {
"terms": {
"field": "my_field",
"size": 100
}
}
}

Am Donnerstag, 14. August 2014 16:40:11 UTC+2 schrieb julie dabbs:

Unfortunately this does not change the total of results returned

On Thursday, August 14, 2014 9:31:12 AM UTC+1, julie dabbs 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

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/36d438ad-707c-49ed-89fa-37b4643386b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.