cancel
Showing results for 
Search instead for 
Did you mean: 

NXQL : select documents where creator email equals ...

Ghazi_HAKIM
Confirmed Champ
Confirmed Champ

Hello,

I know that this NXQL is working :

SELECT * FROM Document WHERE dc:creator = 'user.name'

But is it possible to query on email attribute ? I tried this but it doesn't work 🙂

SELECT * FROM Document WHERE dc:creator/properties/email = 'admin@email.com'

Regards.

1 ACCEPTED ANSWER

Jordann_Roussel
Champ on-the-rise
Champ on-the-rise

Hello,

I don't think you'll be able to do that natively through NXQL, dc:creator is not a complex property, it's a reference toward a principal, that's why you can't search based upon its property (you don't have access to that "object" yet)

Through custom code you could index aside the dc:creator property a new custom dc:creatorEmail property on ElasticSearch, and then use it in your search (or save it in a custom metadata directly if you want to rely on a search against DataBase). But you will need to manage the updates, like catching a user's email update to trigger an update on documents referencing them, which you would need to be careful with (you don't want a user email update to trigger reindexing on millions of documents).

Regards,

View answer in original post

1 REPLY 1

Jordann_Roussel
Champ on-the-rise
Champ on-the-rise

Hello,

I don't think you'll be able to do that natively through NXQL, dc:creator is not a complex property, it's a reference toward a principal, that's why you can't search based upon its property (you don't have access to that "object" yet)

Through custom code you could index aside the dc:creator property a new custom dc:creatorEmail property on ElasticSearch, and then use it in your search (or save it in a custom metadata directly if you want to rely on a search against DataBase). But you will need to manage the updates, like catching a user's email update to trigger an update on documents referencing them, which you would need to be careful with (you don't want a user email update to trigger reindexing on millions of documents).

Regards,

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.