0

I have a document library called Documents. But trying to use the search rest api like so

https://xxx/_api/search/query?querytext=%27Bomb+path:"https://xxx/Documents"%27&selectproperties='Department,Description'

I can see the fields Department and Description fields return values. Currently i'm just pasting the URL above in a web browser. But i can't see Categories and Policy Number. I have tried using the field internal name but no luck :(

Category- Choice Field Description :- Multiple lines of text Category :- Choice Policy Number - Single line of text

Thanks i Advance

1

selectproperties is used to retrieve values of managed properties. So you need add these columns as managed properties to the search schema (in Search Service Application / Central Admin) with Retrievable flag is checked.

SharePoint 2013 Search REST API:

selectproperties

Specifies the list of managed properties to return for each search result item. For a managed property to be returned; the Retrievable flag must be set to "true" in the Search Schema.

UPD:

Search for existed properties before.

In my env choice field DocumentAttr has managed property - DocumentAttrOWSCHCS and text field RegulDocNumb - RegulDocNumbOWSTEXT

  • Thanks. I just checked it and it has the Retrievable property checked – naijacoder Jun 25 '18 at 7:47
  • So with selectproperties='Title,DocumentAttrOWSCHCS,Created' I can retrieve DocumentAttr value in the search query result. – AlexZh Jun 25 '18 at 11:45
  • Thanks. I have a filed called categories(choice field) and when i try retrieving Categories0OWSHHCS as the manage property . I can't see to return the values. see below returning null - <d:element m:type="SP.KeyValue"> <d:Key>Categories0OWSCHCS</d:Key> <d:Value m:null="true" /> <d:ValueType>Null</d:ValueType> </d:element> – naijacoder Jun 26 '18 at 7:16
  • Why it cannot be null? – AlexZh Jun 26 '18 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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