I would like to improve the performance of my app and noticed that if I use the SharePoint REST API, many properties are included in my search results that I do not need and did not request.
My request body looks like this - I am trying to limit the returned fields with the "selectProperties" option:
{
"request": {
"Querytext": "HFCustomer: DemoCustomer docid>1068007945298532582",
"SortList": [
{
"Property": "docid",
"Direction": 0
}
],
"Properties": [
],
"SelectProperties": [
"DocId",
"Title",
"Path",
"Author",
"Size",
"LastModifiedTime"
],
"RowLimit": 10,
"ClientType": "ContentSearchRegular",
"TrimDuplicates": true
}
}
But still each result includes the following segments that are not needed for my app:
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "ResultTypeIdList",
"Value": "0",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "ResultTypeId",
"Value": "0",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "RenderTemplateId",
"Value": "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Default.js",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "piSearchResultId",
"Value": "ARIAǂ36fbb1d6-41b5-3088-e44d-0ef0994f24b0ǂc0c4600e-e178-48f1-9902-f17e59e7670aǂ36fbb1d6-41b5-3088-e44d-0ef0994f24b0.1000.3ǂ",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "Rank",
"Value": "63752309979.3815",
"ValueType": "Edm.Double"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "GeoLocationSource",
"Value": "EUR",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "SiteId",
"Value": "cf4f80dc-68ed-46b6-b246-453c2089c03c",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "UniqueId",
"Value": "{674B8CAB-AC2D-4EE4-BB83-C37EAAF06C6B}",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "WebId",
"Value": "5b866fc8-edad-4d99-b3ad-bf1e58efde61",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "contentclass",
"Value": "STS_ListItem_DocumentLibrary",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "IsExternalContent",
"Value": "false",
"ValueType": "Edm.Boolean"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "ListId",
"Value": "8a69a0fc-de45-41e7-b679-1a49d461d4e0",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "PartitionId",
"Value": null,
"ValueType": "Null"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "UrlZone",
"Value": "0",
"ValueType": "Edm.Int64"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "Culture",
"Value": null,
"ValueType": "Null"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "DocumentSignature",
"Value": "-8973309957882017142;1499228324415174931;-855859975164701460;1416586343137351126;-4611572412426312091;1063957897948293849",
"ValueType": "Edm.String"
},
{
"__metadata": {
"type": "SP.KeyValue"
},
"Key": "CollapsingStatus",
"Value": "0",
"ValueType": "Edm.Int32"
}
Is there any way to exclude those from the search? If my results are 500 this is a big part of the whole response and I could improve my performance if SharePoint would not send this over.