How to search Alfresco for empty property?

cancel
Showing results for 
Search instead for 
Did you mean: 
iceja
Active Member II

How to search Alfresco for empty property?

I have Alfresco 5.2 and my task is "to get all documents with empty (one of) property", I am creating a query

searchParameters.setQuery("search +TYPE:\"ecmcndintregst:nd_int_reg_standards\" +@ecmcnddoc\\:doc_name_ru:\"\" -ASPECT:\"ecmcdict:inactive\" AND ( @ecmcnddoc\\:doc_kind_cp_ecmcdict_value:\"mek\")");



And I got all the documents thus: with either - empty and non-empty ecmcnddoc:doc_name_ru
how can I get ONLY empty ecmcnddoc:doc_name_ru ?

Thank you
please tell me what am I doing wrong? How to search solr for empty properties? When I submit +@ecmcnddoc\:doc_name_ru:"" (without slash) I got all documents with ANY ecmcnddoc:doc_name_ru value Smiley Sad
Thank you

1 Reply
cesarista
Customer

Re: How to search Alfresco for empty property?

Hi:

Did you try with ISNULL operator ? Maybe it can do the job for your use case.

Anyway I link some general reference for custom alfresco-fts searches:

https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-fields.html

Regards.

--C.