0
votes

I have a folder in document library of a site. I want to find all content of that folder. Running following lucene/alfresco-fts query in Node Browser returns No items found:

PATH:"/app:company_home/st:sites/cm:mysite/cm:documentLibrary/cm:MyFolder/*"

Which is wrong, as I have documents in that folder and running same query for different folder returns proper result. Another strange thing is that I cannot get this folder: following query also returns No items found:

PATH:"/app:company_home/st:sites/cm:mysite/cm:documentLibrary/cm:MyFolder"

Also if I get content of document library then MyFolder is skipped in the results and subfolder is returned:

PATH:"/app:company_home/st:sites/cm:mysite/cm:documentLibrary/*"

Name          | Parent
--------------|---------------------
cm:MyFolder2  | /app:company_home/st:sites/cm:mysite/cm:documentLibrary
cm:MySubfolder| /app:company_home/st:sites/cm:mysite/cm:documentLibrary/cm:MyFolder

I have checked the aspects and properties of MyFolder and they are the same as MyFolder2. I do not have any custom behaviours/rules/etc.

How can I make first lucene query work and return content of MyFolder?

2
In my experience this almost always means it's not indexed. Try a CMIS or DB search instead and I bet you will find it, which will prove the theory. - Lista

2 Answers

2
votes

Try updating metadata on the folder so Solr re-indexes it. You could also get its db id and then tell solr to re-index it by db id. If it has over 1000 children, a FTS query may fail. - Known issue. Try using a txmd query.

0
votes

I would suggest you to get the node ref of the folder from folder details page and search in node browser. There you can get the primary path. Please cross verify the path you use to search using lucene or use that primary path to search for the folder in lucene search.

Another possibility is that the locale property(sys:locale) of the folder(MyFolder) will be different from the locale of your browser. Please check whether the locale of MyFolder and the other folders for which result is shown, are same or not. If not that can also be a reason.