class SearchIndexServiceImpl implements SearchIndexService {

    protected SearchIndexStatistics createSearchIndexStatistics(Settings settings, DocsStats docsStats, long indexCount)
    {
        SearchIndexStatistics searchIndexStatistics = new SearchIndexStatistics();

        Long creationDate = settings.getAsLong(IndexMetadata.SETTING_CREATION_DATE, -1L);
        if (creationDate != -1L)
        {
            DateTime creationDateTime = new DateTime(creationDate, DateTimeZone.UTC);
            searchIndexStatistics.setIndexCreationDate(HerdDateUtils.getXMLGregorianCalendarValue(creationDateTime.toDate()));
        }

        searchIndexStatistics.setIndexNumberOfActiveDocuments(docsStats.getCount());
        searchIndexStatistics.setIndexNumberOfDeletedDocuments(docsStats.getDeleted());
        searchIndexStatistics.setIndexUuid(settings.get(IndexMetadata.SETTING_INDEX_UUID));
        searchIndexStatistics.setIndexCount(indexCount);

        return searchIndexStatistics;
    }

}