in ees_microsoft_teams/bootstrap_command.py [0:0]
def execute(self):
"""This function attempts to create a Content Source.
It will use data from configuration file to determine
which instance of Elastic Enterprise Search will be used
to create a Content Source.
"""
schema = {
"title": "text",
"body": "text",
"url": "text",
"created_at": "date",
"name": "text",
"description": "text",
"type": "text",
"size": "text",
}
display = {
"title_field": "title",
"description_field": "description",
"url_field": "url",
"detail_fields": [
{"field_name": "created_at", "label": "Created At"},
{"field_name": "type", "label": "Type"},
{"field_name": "size", "label": "Size (in bytes)"},
{"field_name": "description", "label": "Description"},
{"field_name": "body", "label": "Content"},
],
"color": "#000000",
}
self.workplace_search_custom_client.create_content_source(schema, display, self.args.name, True)