Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Authoring] Adaptive Card In Microsoft Search Result Types not factoring in HitHighlightedSummary formatting #8719

Open
miminum opened this issue Oct 24, 2023 · 0 comments

Comments

@miminum
Copy link

miminum commented Oct 24, 2023

Target Application

Microsoft Search (SharePoint)

Application Operating System

Windows

Schema Version

1.3

Problem Description

I am using Adaptive card for a pdf search result in Microsoft Search.

When rendering the hitHighlightedSummary some html elements such as ` that is retrieved from Microsoft Search does not display as expected ( ... ). I have also attached how pdf results are displayed without a custom result template.

Search Result Schema
Result with Result Template
Result Without Custom Template

Expected Outcome

Adaptive cards has support to render text from Microsoft Search without non user friendly tags within the text.
Result Without Custom Template

Actual Outcome

Adaptive cards displaying text as is (with non user friendly html tags) within the HitHighlighedSummary Field.
Result with Result Template

Card JSON

{ 
    "type": "AdaptiveCard", 
    "version": "1.3", 
    "body": [ 
        { 
            "type": "ColumnSet", 
            "columns": [ 
                { 
                    "type": "Column", 
                    "width": "auto", 
                    "items": [ 
                        { 
                            "type": "Image", 
                            "url": https://res.cdn.office.net/midgard/versionless/fluentui-resources/1.0.29/assets/item-types/32/pdf.svg, 
                            "horizontalAlignment": "Center", 
                            "size": "Small" 
                        } 
                    ], 
                    "horizontalAlignment": "Center" 
                }, 
                { 
                    "type": "Column", 
                    "width": "stretch", 
                    "items": [ 
                        { 
                            "type": "ColumnSet", 
                            "columns": [ 
                                { 
                                    "type": "Column", 
                                    "width": "auto", 
                                    "items": [ 
                                        { 
                                            "type": "TextBlock", 
                                            "text": "[${title}](${titleUrl})", 
                                            "weight": "Bolder", 
                                            "size": "Medium", 
                                            "maxLines": 3, 
                                            "color": "Dark" 
                                        } 
                                    ], 
                                    "spacing": "None" 
                                } 
                            ], 
                            "spacing": "Small" 
                        }, 
                        { 
                            "type": "Container", 
                            "items": [ 
                                { 
                                    "type": "TextBlock", 
                                    "text": "**${modifiedBy}** modified {{DATE(${lastModifiedTime})}}", 
                                    "spacing": "Small", 
                                    "$when": "${modifiedBy!='' && lastModifiedTime!=''}" 
                                }, 
                                { 
                                    "type": "TextBlock", 
                                    "text": "Modified on {{DATE(${lastModifiedTime})}}", 
                                    "spacing": "Small", 
                                    "$when": "${modifiedBy=='' && lastModifiedTime!=''}" 
                                }, 
                                { 
                                    "type": "TextBlock", 
                                    "text": "Modified by __${modifiedBy}__", 
                                    "spacing": "Small", 
                                    "$when": "${modifiedBy!='' && lastModifiedTime==''}" 
                                } 
                            ], 
                            "spacing": "Small" 
                        }, 
                        { 
                            "type": "TextBlock", 
                            "text": "${hitHighlightedSummary}", 
                            "maxLines": 2, 
                            "wrap": true, 
                            "spacing": "Small" 
                        } 
                    ], 
                    "spacing": "Medium" 
                } 
            ] 
        } 
    ], 
    "$schema": http://adaptivecards.io/schemas/adaptive-card.json 
}

Repro Steps

  1. Navigate to search & intelligence settings @ admin.microsoft.com/adminportal/home#/MicrosoftSearch/resultypes
  2. Add new Result Type
  3. Enter Name
  4. Content Source: SharePoint and OneDrive
  5. Rules: select PDF Document
  6. Layout: paste in layout
  7. Save
  8. Search for a pdf document in tenant. (append cacheClear=true query to the URL for changes to appear sooner than later)
@miminum miminum changed the title [Authoring] Bug Title Here [Authoring] Adaptive Card In Microsoft Search Result Types not factoring in HitHighlightedSummary formatting Oct 24, 2023
@github-project-automation github-project-automation bot moved this to Not Triaged in Triage Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Not Triaged
Development

No branches or pull requests

1 participant