Can we use Crawler in alfresco repository to find content with specific aspect or property?

105 views Asked by At

I want to fine All content with specific aspect and property value in alfresco. I am trying to traverse All contents in alfresco repository. But Its taking to much time because there are huge number of contents in repository.

So I am thinking to use Crawler, but using crawler I am only able to traverse content with specific content type.

So can we use it for specific Aspect with specific property value?

Or is there any other faster way to do this?

Please help..

Thanks in Advance...

1

There are 1 answers

1
Lista On

The problem with searching with Lucene/FTS/etc is the fact that permission checking exists. There is a workaround obviously, meaning, you could do a series or smaller queries - in stead of a single large one - but I always found this cumbersome.

My favorite way to get around this is to query the database itself, get the ids/nodeRefs out to a separate table or something like that - then do whatever I need to do with that as a starting point.

For example:

select count(*) from alf_node join alf_node_aspects
on alf_node.id = alf_node_aspects.node_id
join alf_qname
on alf_node_aspects.qname_id = alf_qname.id
where alf_qname.local_name = 'yourAspectName' and
alf_node.store_id = 6;