How to search document based on custom model properties using Rest API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2020 02:55 AM
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
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2020 03:25 AM
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
Problem solved? Click Accept as Solution!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2020 04:28 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 12:22 AM
Hello,
Can anyone help me with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 06:46 AM
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\"" } }

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 12:34 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 03:44 AM
Hello,
Can anyone help me with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 04:34 AM
Can you attach some information from you alfresco.log?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2020 01:44 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2020 12:07 AM
Hi,
Any Update plz?
