Blogroll

The New Domino Admin

A great source of information for Lotus Domino administrators

ecmarchitect.com

Jeff Potts' excellent ECM/Portal blog

Jared Ottley

Lots of very useful Alfresco articles

Looking for web hosting?  I have been using DreamHost for years and have found them to be reliable, inexpensive and very good at what they do!  Click below to sign up, use promo code 'unorganized' to get a free domain registration and 10 bucks off your first year of hosting!

 

dreamhostBadge

Home Software and Tech Software Development Alfresco - How to Find All Content Created by a User
Alfresco - How to Find All Content Created by a User PDF Print E-mail
Written by Nathan McMinn   
Friday, 10 June 2011 09:55

I was recently approached with a request to find all the content that has been created by a particular user in our Alfresco repository.  At first this seemed like a simple request, surely there is a way to view the user account through the Explorer or Share interface and see everything they have created.  Not so, unfortunately.  The Share interface will show you content created recently, but only goes back a short amount of time.  The Explorer interface will allow an admin to see how much disk a user has consumed, but not all of their individual pieces of content.  So, how do we find what we're looking for?

 

The answer lies in Alfresco's robust search capabilities.  Everything in Alfresco is a node, and you can search on any property of those nodes if you know the document model and the search syntax.  To further complicate things Alfresco offers several search options, each with its own pros/cons and syntax.  Perhaps the most powerful and useful of these is the Lucene search.  There are a few ways to execute a Lucene search in Alfresco.  In this case I chose to use the Alfresco Node Browser.  This console can be accessed at the following URL on your Alfresco installation:

 

https://<your_server_name>/alfresco/faces/jsp/admin/node-browser.jsp

 

Once you have signed in and can see the node browser, one of the first things to take note of is the "Search" section at the top of the page.  The drop down menu provided allows you to specify the type of search desired.  For this example, select "Lucene".  Lucene has its own search syntax, some of which is documented in the Alfresco Wiki.    There is also an excellent presentation up on SlideShare that details the various Alfresco search options and has some great examples of how to search for Node aspects, properties, etc using Lucene.

 

OK, so I know I want to use Lucene to search my repository, I know what property I am looking for (creator), I know what value I need that property to have (the user's login) and I have the Node Browser page loaded.  What's the exact string to search for?  In Lucene, the syntax for searching for nodes that have a certain property value is simple.

 

1
@<property_qname>\:"property_value"

 

So, back to my original request.  I need all the documents created by user "John Q. Public", who has the login of "johnqpublic".  

 

1
@<creator>\:"johnqpublic"

 

Pretty simple, right?  This same syntax can be applied to search for nodes with any property value in the Alfresco Repository.  

Last Updated on Friday, 10 June 2011 12:17
 

Comments  

 
#6 Nathan 2011-11-30 15:47
1000 is the default limit in Alfresco for results from a Lucene Query. This might be a contributor to your problem. I've gone through the Alfresco forums for a solution, and it doesn't look like there is a good way around this, other than to further restrict your search terms to get less than 1000 records.
Quote
 
 
#5 2011-11-11 08:36
Hi,
In my case I was not able to get more than 1000 results using nodebrowser.
With Alfresco 3.4.5.
How did you handle this case?
Quote
 
 
#4 2011-07-26 00:51
Hi Nathan,

Thanks a million for your reply.

We are going to customize Alfresco SHARE throughly.

In POC we installed this Share Extras Plugins but now as per requirements it seems like that we have to customize these plugins.

Also we have to customize whole SHARE along with GUI and all stuff.

Please guide how to do these all.

Your Help is Appreciated.

Thanks!
-Nirvan
Quote
 
 
#3 2011-07-25 12:09
Hi Nirvan,

There are quite a few articles on the Alfresco wiki about getting the source, setting up the dev environment, etc. How you set it up depends in part on what you want to do. If you are developing custom content models, workflows, web scripts and other things that live in the repository, your dev environment can be as simple as an Alfresco Community installation and a text editor.

Since you are customizing Share, you might want to take a look at the Alfresco share-extras community project. It has a lot of excellent examples of different types of share customizations.

http://code.google.com/p/share-extras/
Quote
 
 
#2 2011-07-25 11:39
Hello

I am new to Alfresco Share Customization.

We are 5 Developers Team which are going to work on Alfresco Share Customization.

Please guide me how to Set Development Environment for working in Team for this customization Poject.

Please help.

Thanks!
-Nirvan
Quote
 
 
#1 2011-07-21 13:59
Dear Sir,

Can you please help me with Alfresco Search and Lucene thing as I am very New to Alfresco and want to develop some customized report based on Alfresco ?

Now one more thing that Can I apply these same query on Alfresco Database as Reporting engine works only on Database ?

Please Guide.

Your help is much appreciated in this matter.

Thanks!
-Nirvan
Quote
 

Add comment

Please, no spam. Nobody reads it anyway.


Security code
Refresh

RSS Feed Icon

About Me

 

My profile picture

 

My name is Nathan McMinn.  I'm a software engineer, beer geek, wannabe adventurer and genuinely curious guy.  Find me on Facebook, Linkedin or Twitter

Latest Comments