<?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 Re: Sorting custom properties with search api and PATH in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108603#M30503</link>
    <description>&lt;P&gt;Can you see any other stack trace in the log?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 11:05:24 GMT</pubDate>
    <dc:creator>angelborroy</dc:creator>
    <dc:date>2020-04-02T11:05:24Z</dc:date>
    <item>
      <title>Sorting custom properties with search api and PATH</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108602#M30502</link>
      <description>&lt;P&gt;AHello,&lt;/P&gt;&lt;P&gt;i'm trying sorting everything by cutoom properties, but when i will use PATH in query, than server return 500. For example, i would like to get results for my custom type "ssl:document" and my property "ssl&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;id". If i will use query as bellow i will get response with 500&lt;/P&gt;&lt;PRE&gt;{
  "error": {
    "errorKey": "framework.exception.ApiDefault",
    "statusCode": 500,
    "briefSummary": "03021026 Request failed 500 /solr/alfresco/afts?wt=json&amp;amp;fl=DBID%2Cscore&amp;amp;rows=5&amp;amp;df=TEXT&amp;amp;start=0&amp;amp;locale=en_US&amp;amp;alternativeDic=DEFAULT_DICTIONARY&amp;amp;sort=cm%3Aauthor+desc&amp;amp;fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&amp;amp;fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON&amp;amp;fq=%7B%21afts%7D%28-ASPECT%3A%22clf%3Aclassified%22+OR+%28sc%3Aclassification%3A%22TS%22+OR+sc%3Aclassification%3A%22S%22+OR+sc%3Aclassification%3A%22C%22+OR+sc%3Aclassification%3A%22U%22+%29%29",
    "stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions",
    "descriptionURL": "https://api-explorer.alfresco.com",
    "logId": "cd5118d0-f13c-455c-98de-4b9de0beb4d0"
  }
}&lt;/PRE&gt;&lt;P&gt;this doesn't work:&lt;/P&gt;&lt;PRE&gt;{
   "paging":{&lt;BR /&gt;      "maxItems":5,&lt;BR /&gt;      "skipCount":0&lt;BR /&gt;   },
   "query":{&lt;BR /&gt;      "language":"afts",&lt;BR /&gt;      "query":"PATH:'/app:company_home/st:sites/cm:Mailroom/cm:documentLibrary/cm:Unfinished//*' AND TYPE:'ssl:document'"&lt;BR /&gt;   },
   "sort":{
      "ascending":false,
      "field":"ssl:pid",
      "type":"FIELD"
   }
}&lt;/PRE&gt;&lt;P&gt;also this doesn't work&lt;/P&gt;&lt;PRE&gt;{
   "paging":{
      "maxItems":5,
      "skipCount":0
   },
   "query":{
      "language":"afts",
      "query":"PATH:'/app:company_home/st:sites/cm:Mailroom/cm:documentLibrary/cm:Unfinished//*'"
   },
   "sort":{
      "ascending":false,
      "field":"cm:author",
      "type":"FIELD"
   }
}&lt;/PRE&gt;&lt;P&gt;but this works:&lt;/P&gt;&lt;PRE&gt;{
   "paging":{
      "maxItems":5,
      "skipCount":0
   },
   "query":{
      "language":"afts",
      "query":"TYPE:'ssl:document'"
   },
   "sort":{
      "ascending":false,
      "field":"ssl:pid",
      "type":"FIELD"
   }
}&lt;/PRE&gt;&lt;P&gt;Any idea how to sort by my properties and keep PATH in the query?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="gtx-trans-icon"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 Apr 2020 08:12:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108602#M30502</guid>
      <dc:creator>pdovhomilja</dc:creator>
      <dc:date>2020-04-02T08:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting custom properties with search api and PATH</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108603#M30503</link>
      <description>&lt;P&gt;Can you see any other stack trace in the log?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 11:05:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108603#M30503</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2020-04-02T11:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting custom properties with search api and PATH</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108604#M30504</link>
      <description>&lt;P&gt;How&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;"ssl:pid"&lt;/PRE&gt;
&lt;P&gt;is defined?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 11:06:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108604#M30504</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2020-04-02T11:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting custom properties with search api and PATH</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108605#M30505</link>
      <description>&lt;P&gt;I'm sorry, i can not, my knowlege is not so high, i'm learning Alfresco. My model is looking like this&lt;/P&gt;&lt;PRE&gt;  &amp;lt;type name="ssl:parent"&amp;gt;
      &amp;lt;title&amp;gt;SSL Parent&amp;lt;/title&amp;gt;
      &amp;lt;parent&amp;gt;cm:content&amp;lt;/parent&amp;gt;
      &amp;lt;properties&amp;gt;
        &amp;lt;property name="ssl:customAuditCode"&amp;gt;
          &amp;lt;title&amp;gt;Custom Audit Code&amp;lt;/title&amp;gt;
          &amp;lt;type&amp;gt;d:text&amp;lt;/type&amp;gt;
          &amp;lt;mandatory&amp;gt;true&amp;lt;/mandatory&amp;gt;
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="ssl:pid"&amp;gt;
          &amp;lt;title&amp;gt;PID&amp;lt;/title&amp;gt;
          &amp;lt;type&amp;gt;d:text&amp;lt;/type&amp;gt;
          &amp;lt;protected&amp;gt;true&amp;lt;/protected&amp;gt;
          &amp;lt;mandatory&amp;gt;true&amp;lt;/mandatory&amp;gt;
        &amp;lt;/property&amp;gt;
      &amp;lt;/properties&amp;gt;
  &amp;lt;/type&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 11:11:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108605#M30505</guid>
      <dc:creator>pdovhomilja</dc:creator>
      <dc:date>2020-04-02T11:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting custom properties with search api and PATH</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108606#M30506</link>
      <description>&lt;P&gt;Ah, i see, i have to add this to each property? With this index enabled it works...&lt;/P&gt;&lt;PRE&gt;&amp;lt;index enabled="true"&amp;gt;
    &amp;lt;atomic&amp;gt;true&amp;lt;/atomic&amp;gt;
    &amp;lt;stored&amp;gt;false&amp;lt;/stored&amp;gt;
    &amp;lt;tokenised&amp;gt;false&amp;lt;/tokenised&amp;gt;
    &amp;lt;facetable&amp;gt;true&amp;lt;/facetable&amp;gt;
&amp;lt;/index&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 12:05:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-custom-properties-with-search-api-and-path/m-p/108606#M30506</guid>
      <dc:creator>pdovhomilja</dc:creator>
      <dc:date>2020-04-02T12:05:32Z</dc:date>
    </item>
  </channel>
</rss>

