cancel
Showing results for 
Search instead for 
Did you mean: 

Searching file in folder

avinashg
Champ in-the-making
Champ in-the-making
Hi,

I am new to alfresco. I want to search all file in /Company Home/Images folder.
I have written query for this as below.

var query = "PATH:\"/app:company_home/cm:" + search.ISO9075Encode("Images")+ "//*\"";
var nodes = search.luceneSearch(query );

Still I am not getting any file in result.
Let me know if there is anything wrong in search query.

Thanks.
5 REPLIES 5

openpj
Elite Collaborator
Elite Collaborator
Could you please share with us how you drop new contents in Alfresco?

avinashg
Champ in-the-making
Champ in-the-making
For content upload, I am using alfresco explorer. In it I am using 'Add Content' link for uploading content.

One more thing I observed that when I try to search file I uploaded through Alfresco explorer search option, I am not getting these content image files in search result. Is there any issue with permissions for content that I am uploading? Which other permissions than default I need to set for content to be searchable?

openpj
Elite Collaborator
Elite Collaborator
Typically you don't need nothing when you are using one of the Alfresco default user interfaces for common file formats

Anyway Alfresco recognizes many file formats but it is needed that the mimetype and the encoding for the content must be correct in order to create indexes for searches.
Alfresco uses Apache Tika to extract all the text and properties from contents to create Lucene indexes.

All the file formats supported by default by Alfresco are defined in the following XML file:
alfresco/WEB-INF/classes/alfresco/mimetype/mimetype-map.xml

Which types of contents are you uploading in the repository?

avinashg
Champ in-the-making
Champ in-the-making
I have uploaded some jpg files in /Company Home/Images folder. But I am not getting these in search result.
I also checked mimetype-map.xml file and it has jpg files.
Is there any other that is causing file not to show in search?

avinashg
Champ in-the-making
Champ in-the-making
Need help on this. Please respond.