cancel
Showing results for 
Search instead for 
Did you mean: 

search for nodes without content

darionis
Champ on-the-rise
Champ on-the-rise
Hello,

I have a custom document model and I would like to find all custom documents that have no content. I tried with this query

ASPECT:"nsp:customDoc" AND  @cm\:created:[2015-06-15 TO 2015-06-15]  AND ISUNSET:"cm:content"


but it gives me "maxClauseCount is set to 10000" error. If I remove ISUNSET, query works fine. I googled for this error and I understood (more or less) what it means, now I would like to know is there any other efficient way to find docs without content?

Thanks
4 REPLIES 4

rjohnson
Star Contributor
Star Contributor
AND @cm:content.size:0

darionis
Champ on-the-rise
Champ on-the-rise
Thnaks,
I did try   @cm:content.size:0 but it returns nodes with 0 bytes content (like when you have a 0 byte file as a content) For example it finds comments that are blank. So content property has to be set in order to be found by this query.
I was hoping to find nodes that have no content at all?

rjohnson
Star Contributor
Star Contributor
I have had a few documents created with no content (by accident actually) and they have no mimetype. You might try -@cm\:mimetype:* which in theory will return only documents that do not have the mimetype set. This would return 0 byte files as well, but again in theory -@cm\:content:* would return anything where cm:content is not set.

I haven't tried this but the theory goes that +@cm\:content:* would return anything where cm:content exists so -@cm\:content:* should return anything where cm:content does not exist.

Worth a go.

darionis
Champ on-the-rise
Champ on-the-rise
Excellent!  -@cm\:content.mimetype:* finds nodes without content. Combined with aspect clause, finds exactly what i wanted.


Many thanks!