I'm trying to define a 'smart folder template' to search for documents, but it doesn't work as expected. My target objective is to search documents by their properties, but I started with very simple criteria to retrieve/hit all documents. Here is my folder structure
Folder-1
- folder-11 (containing pdf files)
- folder-12 (containing pdf files)
..
- search-folder: (smart-folder)
Here is the content of my JSON file:
{
"name": "Zoek Betaald Facturen",
"nodes": [{
"id": "1",
"name": "PDF Documents",
"search": {
"language": "fts-alfresco",
"query": "=cm:content.mimetype:application/pdf"
}
}
]
}
The template finds only one file: docLib, that comes with Alfresco, and its type is image/png. I've also tried to use some of the search criteria from 'smartFolderExample.json' file with the same result. I appreciate any help to resolve the issue.
Hi,
You forgot for PATH parameter.
Hence your query will, e.g.:
"query": "(PATH:'/app:company_home/st:sites/cm:site-name/cm:documentLibrary//*') AND =cm:content.mimetype:application/pdf"
PATH is mandatory parameter.
Bayu Widyasanyata,
thanks for your reply. I added the path as well. I don't get any hit. Here is my JSON content now:
{
"name": "Zoek Betaald Facturen",
"nodes": [{
"id": "1",
"name": "PDF Documents",
"search": {
"language": "fts-alfresco",
"query": "(PATH:'/app:company_home/st:sites/cm:HBS/cm:documentLibrary//*') AND =cm:content.mimetype:application/pdf"
}
}
]
}
Hi:
Just delete the parenthesis, and try the query again. You must have PDF files in your site.
If nothing appears, may you copy your query directly in Alfresco search ? In that case, do you have any results ?
If nothing appears, you may have some problem with your indices. Try to do searches in this site to check if SOLR is giving you any results.
Regards.
--C.
The path parameter that is required is not the one inside the query itself.
The query can be anything, without the need to include the path, as the Smart Folder can show objects from anywhere in the repository.
The required path parameter is used just when you are using the filing feature. See:
Mandatory property in a filing rule. Path to store new documents. This is the ISO9075 encoded QName.
More on the filing, from the same page:
Optional rule that defines the filing action for a new file when it is uploaded to the Smart Folder. If no filing rule is defined, files are not permitted to be uploaded to that folder. Parameters include:
path: path where a document is physically stored
classification: type and aspects assigned to the new file
properties: property values attributed to the new file
Hi Cesar,
I tried what you suggested, and I got just the one result: docLib (image, and not pdf) file.
Regards,
-nader
Hi:
If you are doing the correct search in a site with pdf files inside, and no values (and same results) are obtained both in Alfresco search field or Smart folder, you may check your SOLR indices and reindex if possible. You should see SOLR related errors in your solr.log or catalina.out, if it is the case.
This recipe may help:
- Performing a full reindex with Solr for Alfresco ECM - zylk
Regards.
--C.
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.