cancel
Showing results for 
Search instead for 
Did you mean: 

How to search for documents that have a list property empty ?

fast_narcis_
Confirmed Champ
Confirmed Champ

Like documents having no value in the dc:subjects field.

4 REPLIES 4

fast_narcis_
Confirmed Champ
Confirmed Champ

Also, how about searching for documents with no subjects OR with subject 'X'.

ThibArg_
Star Contributor
Star Contributor

You can use the following query for this:

SELECT * FROM Document WHERE dc:subjects/* IS NULL

Adding the usual filters on deleted documents or versions:

SELECT * FROM Document WHERE dc:subjects/* IS NULL AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted'

If the question is about the User Interface and the default forms displayed by Nuxeo (in the FacetedSearch for example), then you must override the search or add you own (Content-View in Studio, with the "Faceted Search" box checked), because by default, Nuxeo handles the empty parameters of these layouts as if they where not filled at all.

It works ! Thank you very much !

Good idea. Just did it today thanks