New Facet for searchWeb Portlet in Liferay 7.2

Iñigo Boyano, modified 5 Years ago. Junior Member Posts: 96 Join Date: 2/4/14 Recent Posts
Hi,
 I've seen that in Liferay  7.2 there are many facets to customize our searhPortlet results but i can´t find any to sort the results by publishedDate.
I suppose that I have to develop a MVP Portlet like ModifiedFacetPortlet to acomplish this task.
I've looking how the ModifiedFacetPortlet works and i'm trying to replicate it but searching for other search field, but when i try to create the buildDisplayContext, i'm trying to get the Facet object trought portletSharedSearchResponse.getFacet(getFieldName()).
This field name only returns a valid Facet when the value is "modified", that returns the modifiedFacet.
How can i create a new Facet to create the same type of portlet like ModifiedFacet but filtering by publishDate? 
Iñigo Boyano, modified 5 Years ago. Junior Member Posts: 96 Join Date: 2/4/14 Recent Posts
Hi!,
Any idea of how can i create a facet to sort the results of the search by createdDate?
Kind regards,