search document by directory and title

I am new to nuxeo. Is there possibilities to search document by directory and title. For example I have document “HelloWorld.doc” which is located inside “/default-domain/workspaces/Sample Content/PDF and Office Documents” . I can run rest api that giving me all documents inside “/default-domain/workspaces/Sample Content/PDF and Office Documents”

GET http://nuxeo/nuxeo/api/v1/search/lang/NXQL/execute?query=select * from Document WHERE ecm:path STARTSWITH '/default-domain/workspaces/Sample Content/PDF and Office Documents'

But where I can specify document name, which in my case is “HelloWorld.doc”. Example will be appreciated. Thank you in advance.

0 votes

1 answers

2500 views

ANSWER



GET http://nuxeo/nuxeo/api/v1/search/lang/NXQL/execute?query=select * from Document WHERE ecm:path STARTSWITH '/default-domain/workspaces/Sample Content/PDF and Office Documents' AND file:content/name = 'HelloWorld.doc'

See https://doc.nuxeo.com/nxdoc/nxql/ for more information and examples about NXQL queries.

2 votes