Vincent
Vincent

Reputation: 540

how to specify the type of document in lucene query?

I only want to retrieve "cmis:document" with no wiki, blog,... in a lucene search on Alfresco 3.4.7 but I can't figure out how.

TYPE:"cmis:document"

doesn't work.

Is there a way to specify multiple mimetypes in the query ?

Upvotes: 1

Views: 1717

Answers (1)

skuro
skuro

Reputation: 13514

Alfresco supports different query schemes, and cmis:document makes sense only for CMIS queries. Lucene queries use the Alfresco domain model instead of its CMIS view:

TYPE:"cm:content" AND -TYPE:"cm:folder"

Then if you want to filter by MIME type:

@\{http\://www.alfresco.org/model/content/1.0\}content.mimetype:text/plain

or:

@cm\:content.mimetype:text/plain

Upvotes: 2

Related Questions