Search: returns categories?

cancel
Showing results for 
Search instead for 
Did you mean: 
kemmett
Active Member

Search: returns categories?

Version: Alfresco Community 201702

New to Alfresco, sorry if this has been covered elsewhere.

Does Alfresco return results from category titles themselves? e.g. I have created several nested categories, and added them (and their parent) to an image. When I search by typing any of those category titles in the search bar, I get zero results.

Is this expected?

7 Replies
afaust
Master

Re: Search: returns categories?

By default Alfresco is not capable of searching for categories via the simple search input field. Only tags (a special type of categories) are supported in that way.

mehe
Senior Member II

Re: Search: returns categories?

As Axel Faust‌ said, there is no direct/easy way to search for categories as there is for tags. But the documents categories nodeRefs are a collection that is stored in the property field cm:categories of the categorized document (you can see this in the node browser).  

So - if you got the nodeRef of your category (again - you can also see it in the node browser) you can search for

cm:categories:"NODEREFofYourCategory"

and would get your documents. Ugly, isn't it? NodeRefs are the "workspace://SpacesStore..." thing...

kemmett
Active Member

Re: Search: returns categories?

Thank you both Axel and Martin. I am puzzled as to why categories are not included as either a search option, or included in search results by default. I assume we will have to customise Alfresco to provide this functionality to general site users/collaborators. Can you advise what might be the best way to achieve this please?

I've seen several threads mentioning modifying the advanced search (e.g. Advanced Search Custom Attributes). I've also seen threads which mention modifying the search templates to add properties into those files (e.g. search custom properties?  and Custom properties making Searchable with value{Resloved} ). Would either of these approaches allow us to achieve what we require please?

Thanks again,

Chris

kemmett
Active Member

Re: Search: returns categories?

OK, answering my own question: customising the advanced search form according to this entry worked for me - Share Advanced Search . Have not been able to get the customisation to work if the file is outside of this path: \tomcat\webapps\share\WEB-INF\classes\alfresco Still looking for an answer to that.

mehe
Senior Member II

Re: Search: returns categories?

Hi Chris,

if if the category filter option is ok for you, fine. Using categories in the search field would eventually be possible if you define them in search query templates. But this would rather static and isn't a good solution either...

If you are on newer Alfresco Versions, you can customize the advanced search via the "search manager" - it's accessible if you are a search_administrator (admin is) through a link in the right head part of the advanced search page.

http://docs.alfresco.com/5.0/concepts/super-search-manager.html

http://docs.alfresco.com/community/concepts/super-search-manager.html

kemmett
Active Member

Re: Search: returns categories?

Hi Martin,

Thanks for the pointer - I will take another look at the Search manager functionality.

hardik_thakkar
Active Member II

Re: Search: returns categories?

Hi Martin,

As suggested by you, i have tried to add categories in Search Manager, when we enter cm:categories in filter property it won't allow and gives error like not valid property.

Any other options to search category.

Thanks in advance!
Hardik