2

Is there a way to get search hits in

  • HitHighlightedSummary
  • HitHighlightedProperties

on people search using REST?

/_api/search/query?querytext=%27ers%27&sourceid=%27b09a7990-05ea-4af9-81ef-edfab16c4e31%27&selectproperties=%27UserName,FirstName,LastName,HitHighlightedProperties,HitHighlightedSummary,Office%27

I only get empty properties..

<d:element m:type="SP.KeyValue">
   <d:Key>HitHighlightedProperties</d:Key>
   <d:Value m:null="true"/><d:ValueType>Null</d:ValueType>
</d:element>

<d:element m:type="SP.KeyValue">
  <d:Key>HitHighlightedSummary</d:Key><d:Value/>
  <d:ValueType>Edm.String</d:ValueType>
</d:element>

Sharepoint 2013 on-prem

1 Answer 1

0

I am having the same problem, if I enter no searchproperty I have HitHighlightedSummary but if I define it with the summary it returns null. Have you solved it?

I found it. Apparently you should seperate them;

SelectProperties: ['ListItemID', 'Title', 'Path', 'Description', 'SPWebUrl', 'contentClass', 'IsContainer', 'PictureThumbnailURL', 'HitHighlightedSummary'],

this was the old one

SelectProperties: ['ListItemID, Title, Path, Description, SPWebUrl, contentClass, IsContainer, PictureThumbnailURL, HitHighlightedSummary'],

Also this query works for me:

/_api/search/query?querytext='search'&SourceId='32e1c04c-651b-4dfb-a240-ddc5332decff'&selectproperties=%27Title,HitHighlightedProperties,HitHighlightedSummary%27
1
  • 1
    Sorry a bit new here, thanks for help
    – Ozan Mudul
    Aug 19, 2021 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.