Hello,
Need your help to execute task where I need to search document based on custom model properties.
Task performed-
with Rest API POST '/nodes/{nodeId}/' - I have uploaded document.
As I already developed my content model aspect and property
with Rest API PUT '/nodes/{id}' - I have updated my document with content model property and based on this property I got my aspect name in response.
Task I need to Performed-
Based on this property I need to fetch my document.
Need your help to execute this task by using Rest API
Hi @MOH_MCT ,
Here are two threads about searching custom model properties. The first relates to the problems sometimes caused by locale. The second relates to tokenised value. Both have source code that might help you start.
HTH
Hi @EddieMay
before making Rest API call I am searching my document in alfresco share under Node Browser selecting Lucene as search.
But I am getting the following error- 05181400 Request failed 500 /solr/alfresco/alfresco?wt=json&fl=DBID%2Cscore&rows=100&df=TEXT&start=0&locale=en_US&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
request for search
TYPE:"cm:content" AND od:ReObjID:"OmGanesh"
where od:ReObjID is my custom content model property and OmGanesh is my value.
Hello,
Can anyone help me with this?
Use the Search API:
https://api-explorer.alfresco.com/api-explorer/#!/search/search
The JSON Body should be something similar to:
{ "query": { "query": "TYPE:\"cm:content\" AND od:ReObjID:\"OmGanesh\"" } }
After trying the same JSON I am getting the following error:
//{
"error": {
"errorKey": "framework.exception.ApiDefault",
"statusCode": 500,
"briefSummary": "05221526 Request failed 500 /solr/alfresco/afts?wt=json&fl=DBID%2Cscore&rows=100&df=TEXT&start=0&locale=en_US&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON",
"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": "5493511c-1c08-470f-9817-bd34f0675e71"
}
}//
JSON Request Used
//{ "query": { "query": "TYPE:\"cm:content\" AND od:ReObjID:\"OmGanesh\"" } }//
Kindly help me with this
Hello,
Can anyone help me with this?
Can you attach some information from you alfresco.log?
Hi @angelborroy
I am attaching logs please download it from a link
https://drive.google.com/drive/folders/17ne9en04wQwWcvRYWTo2olOVsbWVc3GB?usp=sharing
Please let me know how i can overcome this issue
Hi,
Any Update plz?
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.