Just index the same document with another ID (or without any ID using a POST /index/type)
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 7 mai 2014 à 17:51:28, Ha Lan Quyen (dangokuson@gmail.com) a écrit:
Yep David,
What the expectation in this case is it will be returned doc_count for that url is 5. Because that url has been indexed 5 times.
On Wednesday, May 7, 2014 10:17:31 PM UTC+7, David Pilato wrote:
It means that you have updated the same document five times because you are using the same _id.
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 7 mai 2014 à 16:00:45, Ha Lan Quyen (dango...@gmail.com) a écrit:
Thanks David Pilato,
I tried to use terms aggregations but it always returned the doc_count is 1 even that url has been indexed many times.
E.g: the url http://localhost:8080/test-es/en/elasticsearch has been indexed 5 times. but the doc_count of terms aggregation for that url just return 1
Thanks
On Wednesday, May 7, 2014 5:51:46 PM UTC+7, David Pilato wrote:
You need to use:
A Range Filter: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html
A Terms aggregation: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation
I would recommend reading as well: http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_ranges.html
HTH
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 7 mai 2014 à 12:29:00, Ha Lan Quyen (dango...@gmail.com) a écrit:
Hi everyone,
I just begin to use elasticsearch for report. When have a request access to my website then I will index that by using elasticsearch with some information like: url, date, host.. and now i want to get top 10 urls from start date to finish date.
E.g: get 10 urls ordered by the access number of request from 2014/05/01 to 2014/05/30.
So how can I do it with elasticsearch?
Thanks
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/5caa5622-d4b3-4ce5-921a-b3e5a722cfef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/etPan.536a64fa.643c9869.944f%40air-de-david.esprit.tn.
For more options, visit https://groups.google.com/d/optout.