# Help With Popular Content type List with ES

**URL:** <https://discuss.elastic.co/t/help-with-popular-content-type-list-with-es/7116>\
**Category:** Elasticsearch\
**Created:** [March 25, 2012, 8:05pm UTC](https://discuss.elastic.co/t/help-with-popular-content-type-list-with-es/7116 "2012-03-25T20:05:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_Baratam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveen_baratam/32/2750_2.png) [@Praveen\_Baratam](https://discuss.elastic.co/u/Praveen_Baratam)\
**Post date:** [March 25, 2012, 8:05pm UTC](https://discuss.elastic.co/t/help-with-popular-content-type-list-with-es/7116/1 "2012-03-25T20:05:02Z")

</div>

Hello Everyone,

I use the following schema to store documents in ElasticSearch.

{  
"id":"master-chef-america",  
"title":"Master Chef - America",  
"description":"Event related rant, comments and discussion..",  
"author":"Praveen Baratam",  
"date":1332705307,  
"popularity":1  
}

Now apart from searching the docs for keywords, I want to list the  
latest posts ranked by popularity and recency using popularity and  
date properties of the docs.

Can we do that using ES?

Thank you.

Praveen

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [March 26, 2012, 2:39am UTC](https://discuss.elastic.co/t/help-with-popular-content-type-list-with-es/7116/2 "2012-03-26T02:39:30Z")

</div>

First you need to declare date as Date type -

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Next you need to sort based on date field for getting latest news with  
match\_all query type -

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Use the same for popularity too.

Thanks  
Vineeth

On Mon, Mar 26, 2012 at 1:35 AM, Praveen Baratam  
[praveen.baratam@gmail.com](mailto:praveen.baratam@gmail.com)wrote:

> Hello Everyone,
> 
> I use the following schema to store documents in Elasticsearch.
> 
> {  
> "id":"master-chef-america",  
> "title":"Master Chef - America",  
> "description":"Event related rant, comments and discussion..",  
> "author":"Praveen Baratam",  
> "date":1332705307,  
> "popularity":1  
> }
> 
> Now apart from searching the docs for keywords, I want to list the  
> latest posts ranked by popularity and recency using popularity and  
> date properties of the docs.
> 
> Can we do that using ES?
> 
> Thank you.
> 
> Praveen

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:34am UTC](https://discuss.elastic.co/t/help-with-popular-content-type-list-with-es/7116/3 "2017-07-06T03:34:52Z")

</div>


