AnsweredAssumed Answered

Lucene Search by Mimetype always returns nothing

Question asked by tahitianstud on Jul 30, 2008
Hello Alfresco community,

I am trying to filter out search results by mimetyme (in this particular case, only PDFs are wanted) but something is not right since the following query always return an empty list:


var luceneQuery = "+PATH:\"/app:company_home/"+namePath+"\" +TEXT:\""+searchterms+"\" +TYPE:\"cm:content\" +@cm\:content.mimetype:\"application/pdf\"" ;
var nodes = search.luceneSearch(luceneQuery);

where namePath is correctly set to the right subset of the repository and searchterms is the keyword(s) we are looking for.

In fact, I know everything else works since the following:

var luceneQuery = "+PATH:\"/app:company_home/"+modifiedNamePath+"\" +TEXT:\""+searchterms+"\" +TYPE:\"cm:content\""

returns the results correctly (albeit with mixed mimetypes).


Can somebody who has tried to do this confirm that this feature doesn't work or on the contrary tell me if I am not doing it the right way?


My setup consists of :

Alfresco Enterprise 2.2 + Redhat Enterprise Linux 5


Thanks a bunch in advance.

Outcomes