Redigera

Dela via


Result layout for Azure DevOps Wiki Graph connector

The Azure DevOps Wiki Graph connector allows your organization to index wikis from Azure DevOps service. After you configure the connector and index content, you need to set up a search result page.

To set up the search result page, you need to:

  1. Set up search vertical.
  2. Set up search result type.

In this document, we have provided a sample result layout JSON required for setting up your result layout for Azure DevOps Wiki connector.

Before you get started

You must have configured the Azure DevOps Wiki Graph connector. To consume the sample result layout JSON as is, you must select the below properties for indexing with mentioned search schema.

Note

  • Retrieve search attribute is required for displaying a property in search result template. A property can have other search attributes also.
Property Search schema attribute required
Title Retrieve
RemoteURL Retrieve
LastPublishedAuthorName Retrieve
LastPublishedDate Retrieve
Content Content property
Organization Retrieve
Project Retrieve
WikiIdentifier Retrieve

Result layout

With this sample, your search results will look like:

Example of a layout for Azure DevOps Wiki connector.

And here's the layout's associated JSON file:

{
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": "auto",
                    "items": [
                        {
                            "type": "Image",
                            "url": "https://searchuxcdn.blob.core.windows.net/designerapp/images/AzureDevOpsLogo.png",
                            "horizontalAlignment": "Center",
                            "altText": "Not available",
                            "width": "-1px",
                            "size": "Small"
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": 8,
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "[${Title}](${RemoteURL})",
                            "color": "Accent",
                            "size": "Medium",
                            "weight": "Bolder"
                        },
                        {
                            "type": "TextBlock",
                            "text": "__${LastPublishedAuthorName}__ modified on {{DATE(${LastPublishedDate})}}",
                            "spacing": "Small"
                        },
                        {
                            "type": "ColumnSet",
                            "columns": [
                                {
                                    "type": "Column",
                                    "width": "stretch",
                                    "items": [
                                        {
                                            "type": "TextBlock",
                                            "text": "__Organization:__ ${Organization}"
                                        }
                                    ]
                                },
                                {
                                    "type": "Column",
                                    "width": "stretch",
                                    "items": [
                                        {
                                            "type": "TextBlock",
                                            "text": "__Project:__ ${Project}"
                                        }
                                    ]
                                },
                                {
                                    "type": "Column",
                                    "width": "stretch",
                                    "items": [
                                        {
                                            "type": "TextBlock",
                                            "text": "__Wiki:__ ${WikiIdentifier}"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "type": "TextBlock",
                            "text": "${ResultSnippet}",
                            "wrap": true,
                            "maxLines": 3,
                            "spacing": "Medium"
                        }
                    ],
                    "horizontalAlignment": "Center",
                    "spacing": "Medium"
                }
            ]
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "$data": {
    }
}

Resources

Customize search result page

Manage search result layouts