question

AmolTidke-4067 avatar image
0 Votes"
AmolTidke-4067 asked saldana-msft edited

Search response is returning two commas for single comma in URL field

Hi Team,



I am using search query to get the result in my spfx code as below:



https://mysiteurl/_api/search/query?querytemplate=%27ContentType:Tools AND (SPTranslationLanguage:{CurrentDisplayLanguage} OR (NOT SPTranslatedLanguages:{CurrentDisplayLanguage} AND NOT SPIsTranslation:true))%27&SelectProperties=%27Title,ListItemID,Description,Path,ToolLinkOWSURLH,ows_BusinessOwner,owstaxIdBusinessOwner,SPContentType%27&rowlimit=100&trimduplicates=false%27

here in the response in the field ToolLinkOWSURLH we get the url of the tool page and its working fine.
eg: ToolLinkOWSURLH: "https://contoso.sharepoint.com/testsite/SitePages/TestTool.aspx

But if I have comma "," in the page name like Test,Tool then it returned two commas in the response as below:
ToolLinkOWSURLH: "https://contoso.sharepoint.com/testsite/SitePages/Test,,Tool.aspx

So Can someone help that why search query is returning two commas for single comma in page url??

Any help is appreciated a lot!!

Thanks & Regards,
Amol Tidke
 

office-sharepoint-onlinemicrosoft-graph-search
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered IanJackson-7818 commented

Hi @AmolTidke-4067,

Could you please share more details of the managed property ToolLinkOWSURLH ? What's the type of that column?

Per my test, if I search the page directly, the comma shows well for the path property.


104690-image.png



If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (17.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am experiencing the same issue. @MichaelHan-MSFT try using a "Hyperlink or Picture" column and format URL as "Picture"

0 Votes 0 ·