@staticmethod
def get_elastic_mappings(es_major):
    """Get Elasticsearch mapping.

        Ensure data.message is string, since it can be very large

        :param es_major: major version of Elasticsearch, as string
        :returns:        dictionary with a key, 'items', with the mapping
        """
    mapping = """
         {
            "dynamic":true,
            "properties": {
                "id" : {
                    "type" : "keyword"
                },
                "interval_months" : {
                    "type" : "long"
                },
                "origin" : {
                    "type" : "keyword"
                },
                "study_creation_date" : {
                    "type" : "date"
                },
                "total_blanks" : {
                    "type" : "long"
                },
                "total_blanks_per_loc" : {
                    "type" : "float"
                },
                "total_ccn" : {
                    "type" : "long"
                },
                "total_comments" : {
                    "type" : "long"
                },
                "total_comments_per_loc" : {
                    "type" : "float"
                },
                "total_files" : {
                    "type" : "long"
                },
                "total_loc" : {
                    "type" : "long"
                },
                "total_loc_per_function" : {
                    "type" : "float"
                },
                "total_num_funs" : {
                    "type" : "long"
                },
                "total_tokens" : {
                    "type" : "long"
                }
            }
        }
        """
    return {'items': mapping}
