AHello,
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 "sslid". If i will use query as bellow i will get response with 500
{ "error": { "errorKey": "framework.exception.ApiDefault", "statusCode": 500, "briefSummary": "03021026 Request failed 500 /solr/alfresco/afts?wt=json&fl=DBID%2Cscore&rows=5&df=TEXT&start=0&locale=en_US&alternativeDic=DEFAULT_DICTIONARY&sort=cm%3Aauthor+desc&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON&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" } }
this doesn't work:
{ "paging":{
"maxItems":5,
"skipCount":0
}, "query":{
"language":"afts",
"query":"PATH:'/app:company_home/st:sites/cm:Mailroom/cm:documentLibrary/cm:Unfinished//*' AND TYPE:'ssl:document'"
}, "sort":{ "ascending":false, "field":"ssl:pid", "type":"FIELD" } }
also this doesn't work
{ "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" } }
but this works:
{ "paging":{ "maxItems":5, "skipCount":0 }, "query":{ "language":"afts", "query":"TYPE:'ssl:document'" }, "sort":{ "ascending":false, "field":"ssl:pid", "type":"FIELD" } }
Any idea how to sort by my properties and keep PATH in the query?
Thank you
Can you see any other stack trace in the log?
How
"ssl:pid"
is defined?
I'm sorry, i can not, my knowlege is not so high, i'm learning Alfresco. My model is looking like this
<type name="ssl:parent"> <title>SSL Parent</title> <parent>cm:content</parent> <properties> <property name="ssl:customAuditCode"> <title>Custom Audit Code</title> <type>d:text</type> <mandatory>true</mandatory> </property> <property name="ssl:pid"> <title>PID</title> <type>d:text</type> <protected>true</protected> <mandatory>true</mandatory> </property> </properties> </type>
Ah, i see, i have to add this to each property? With this index enabled it works...
<index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>false</tokenised> <facetable>true</facetable> </index>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.