in ees_sharepoint/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",
}
display = {
"title_field": "title",
"description_field": "description",
"url_field": "url",
"detail_fields": [
{"field_name": 'description', "label": 'Description'},
{"field_name": 'body', "label": 'Content'},
{"field_name": 'created_at', "label": 'Created At'}
],
"color": "#000000"
}
self.workplace_search_custom_client.create_content_source(schema, display, name=self.args.name, is_searchable=True)