cancel
Showing results for 
Search instead for 
Did you mean: 

Search Document which have NULL OR Empty metadata using predicate

Ahmad_Ben_Maall
Star Contributor
Star Contributor

Hello,

Can we process the following request with a generic page provider

SELECT * FROM Document WHERE dc:language = '' OR dc:language IS NULL

For information I managed to look for the nulls but I don't know how to add a predicate on the empty space and especially how to add the "OR" between them.

My code :

<genericPageProvider class="org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider" name="custom_search">
      <whereClause docType="CustomSearch">
        <predicate operator="IS NULL" parameter="dc:language">
          <field name="searchNullLanguage" schema="custom_search"/>
        </predicate>
        <fixedPart>
	  ecm:isVersion = 0 AND ecm:isTrashed = 0 AND ecm:isProxy=0
        </fixedPart>
      </whereClause>
	<aggregates>
		....
	</aggregates>
      <pageSize>20</pageSize>
    </genericPageProvider>

Thank you

2 REPLIES 2

Gregory_Carlin
Elite Collaborator
Elite Collaborator

Thanks Gregory Carlin for the reply

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.