<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Search API result gives empty entities in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/search-api-result-gives-empty-entities/m-p/15910#M7029</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm new to Alfresco development so please, bare&amp;nbsp; with me.&lt;/P&gt;&lt;P&gt;I post the following body to the search api (using postman)&lt;/P&gt;&lt;PRE&gt;{
	"query": {
		"language": "afts",
		"userQuery": null,
		"query": "+TYPE:\"cm:content\" AND content.mimetype:\"image/vnd.dwg\" AND ANCESTOR:\"workspace://SpacesStore/7e369873-7b19-4d0d-bc8e-fab2b50ca641\""
	},
	"paging": {
		"maxItems": 25,
		"skipCount": 0
	},
	"include": null,
	"includeRequest": false,
	"fields": [
		"cm:description",
		"cm:title",
		"cm:versionLabel"
	],
	"sort": [
		{
			"type": "FIELD",
			"field": "cm:name",
			"ascending": true
		}
	],
	"templates": null,
	"defaults": null,
	"localization": {
		"timezone": null,
		"locales": [
			"en-US"
		]
	},
	"filterQueries": null,
	"facetQueries": null,
	"facetFields": null,
	"facetIntervals": null,
	"pivots": null,
	"stats": null,
	"spellcheck": null,
	"scope": null,
	"limits": null,
	"highlight": null,
	"ranges": null
}&lt;/PRE&gt;&lt;P&gt;and I get&lt;/P&gt;&lt;PRE&gt;{
    "list": {
        "pagination": {
            "count": 4,
            "hasMoreItems": false,
            "totalItems": 4,
            "skipCount": 0,
            "maxItems": 25
        },
        "context": {
            "consistency": {
                "lastTxId": 348
            }
        },
        "entries": [
            {
                "entry": {}
            },
            {
                "entry": {}
            },
            {
                "entry": {}
            },
            {
                "entry": {}
            }
        ]
    }
}&lt;/PRE&gt;&lt;P&gt;As you can see, I get empty entries.&lt;/P&gt;&lt;P&gt;Now, if I remove the fields frommy qury, then I get the result expected.&lt;/P&gt;&lt;P&gt;However, I need to get those properties in the result.&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2022 09:57:43 GMT</pubDate>
    <dc:creator>FrankyDee</dc:creator>
    <dc:date>2022-07-28T09:57:43Z</dc:date>
    <item>
      <title>Search API result gives empty entities</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/search-api-result-gives-empty-entities/m-p/15910#M7029</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm new to Alfresco development so please, bare&amp;nbsp; with me.&lt;/P&gt;&lt;P&gt;I post the following body to the search api (using postman)&lt;/P&gt;&lt;PRE&gt;{
	"query": {
		"language": "afts",
		"userQuery": null,
		"query": "+TYPE:\"cm:content\" AND content.mimetype:\"image/vnd.dwg\" AND ANCESTOR:\"workspace://SpacesStore/7e369873-7b19-4d0d-bc8e-fab2b50ca641\""
	},
	"paging": {
		"maxItems": 25,
		"skipCount": 0
	},
	"include": null,
	"includeRequest": false,
	"fields": [
		"cm:description",
		"cm:title",
		"cm:versionLabel"
	],
	"sort": [
		{
			"type": "FIELD",
			"field": "cm:name",
			"ascending": true
		}
	],
	"templates": null,
	"defaults": null,
	"localization": {
		"timezone": null,
		"locales": [
			"en-US"
		]
	},
	"filterQueries": null,
	"facetQueries": null,
	"facetFields": null,
	"facetIntervals": null,
	"pivots": null,
	"stats": null,
	"spellcheck": null,
	"scope": null,
	"limits": null,
	"highlight": null,
	"ranges": null
}&lt;/PRE&gt;&lt;P&gt;and I get&lt;/P&gt;&lt;PRE&gt;{
    "list": {
        "pagination": {
            "count": 4,
            "hasMoreItems": false,
            "totalItems": 4,
            "skipCount": 0,
            "maxItems": 25
        },
        "context": {
            "consistency": {
                "lastTxId": 348
            }
        },
        "entries": [
            {
                "entry": {}
            },
            {
                "entry": {}
            },
            {
                "entry": {}
            },
            {
                "entry": {}
            }
        ]
    }
}&lt;/PRE&gt;&lt;P&gt;As you can see, I get empty entries.&lt;/P&gt;&lt;P&gt;Now, if I remove the fields frommy qury, then I get the result expected.&lt;/P&gt;&lt;P&gt;However, I need to get those properties in the result.&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 09:57:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/search-api-result-gives-empty-entities/m-p/15910#M7029</guid>
      <dc:creator>FrankyDee</dc:creator>
      <dc:date>2022-07-28T09:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Search API result gives empty entities</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/search-api-result-gives-empty-entities/m-p/15911#M7030</link>
      <description>&lt;P&gt;I forgot to mention that I'm using the Community edition version 7.2 is that can make a difference....&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 07:24:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/search-api-result-gives-empty-entities/m-p/15911#M7030</guid>
      <dc:creator>FrankyDee</dc:creator>
      <dc:date>2022-08-01T07:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Search API result gives empty entities</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/search-api-result-gives-empty-entities/m-p/15912#M7031</link>
      <description>&lt;P&gt;Forget it, I found the solution.&lt;/P&gt;&lt;P&gt;In stead of defineing the fields, I just needed to include the properties. The right query body would now look like&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
	"query": {
		"language": "afts",
		"userQuery": null,
		"query": "+TYPE:\"cm:content\" AND content.mimetype:\"image/vnd.dwg\" AND ANCESTOR:\"workspace://SpacesStore/7e369873-7b19-4d0d-bc8e-fab2b50ca641\""
	},
	"paging": {
		"maxItems": 25,
		"skipCount": 0
	},
	"include": [
		"properties"
	],
	"includeRequest": false,
	"fields": null,
	"sort": [
		{
			"type": "FIELD",
			"field": "cm:name",
			"ascending": true
		}
	],
	"templates": null,
	"defaults": null,
	"localization": {
		"timezone": null,
		"locales": [
			"en-US"
		]
	},
	"filterQueries": null,
	"facetQueries": null,
	"facetFields": null,
	"facetIntervals": null,
	"pivots": null,
	"stats": null,
	"spellcheck": null,
	"scope": null,
	"limits": null,
	"highlight": null,
	"ranges": null
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Aug 2022 10:58:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/search-api-result-gives-empty-entities/m-p/15912#M7031</guid>
      <dc:creator>FrankyDee</dc:creator>
      <dc:date>2022-08-01T10:58:54Z</dc:date>
    </item>
  </channel>
</rss>

