user1907906
user1907906

Reputation:

Search for content encoding

In Alfresco it is possible to search for a document with a content mimetype like this:

@cm\:content.mimetype:text/plain

The search documenatition describes this as

Content has some additional information about the mimetype and size which can also be used in queries. These are of the form @cm:content.mimetype.

Question

Is it possible to search for a content encoding, too? This has no effect:

@cm\:content.encoding:UTF-8

Upvotes: 3

Views: 577

Answers (1)

Dominik Minc
Dominik Minc

Reputation: 341

I am using the Alfresco 4.2.d and in the Repository search I get results for eg. UTF-16BE encoding when searching like this:

 @cm\:content.encoding:UTF-16BE

Url: http://localhost:8080/share/page/search?t=%40cm%5C%3Acontent.encoding%3AUTF-16BE&s=&a=true&r=true

or when using the server side JavaScript search (webscript):

var query = "@cm\\:content.mimetype:text/plain AND @cm\\:content.encoding:UTF-16BE";
var nodes = search.luceneSearch(query, null, true, 1000);

Upvotes: 1

Related Questions