Help With Popular Content type List with ES

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

First you need to declare date as Date type -

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

Use the same for popularity too.

Thanks
Vineeth

On Mon, Mar 26, 2012 at 1:35 AM, Praveen Baratam
praveen.baratam@gmail.comwrote:

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