SaaS CMS has officially launched! Learn more now.

Unified Search - Histogram facet on 'Created' property

Vote:
 

I want to create a histogramfacet based on when the page or file was created. Making a histogram facet with the published date was easy, but the created date is not part of ISearchContent.

#80603
Jan 27, 2014 18:14
Vote:
 

I think you can do something like this:

 

            var result =
            ...
             .HistogramFacetFor(x => ((IChangeTrackable) x).Created, DateInterval.Year)
                .GetResult();
             var facets = result.HistogramFacetFor<IChangeTrackable>(x => x.Created);

    

#80707
Jan 30, 2014 10:51
Vote:
 

Works like a charm. Thanks!

#80905
Feb 04, 2014 16:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.