5

using Alfresco 4.0.1 we have added numerous new entities and linked them to cm:content. When we search, we want to be able to search not only by criteria of content, but want to say give us all content that is linked to libraries with these properties (for examlpe).

We would expect we need to add a new Solr core (index) and populate it.

Has anyone done this? Can someone offer a hint or two, or a link to a post exlpaining it.

Thanks --MB

Addition 1: linked means the content is 'linked' with other entities using Alfresco's Peer (Non-Child) Associations.

Addition 2: for example if our model is content and libraries (but it's much more complicated then that), these are linked using peer (non-child) associations because we were not able to use parent-child for other reasons. So what we want to search for is all content with name "document", but that are linked to libreries with location "Texas".

3
  • Can you give an example of such properties/meta-data attributes? Commented Jun 25, 2012 at 20:00
  • Define "linked". Note that relations in Alfresco should be modeled using associations. wiki.alfresco.com/wiki/Data_Dictionary_Guide#Child_Associations Commented Jun 26, 2012 at 5:53
  • Thanks for questions, tried to answer them in Addiontion1 & 2 within the question. Commented Jun 26, 2012 at 9:04

1 Answer 1

4

The bottom-line is that Alfresco isn't relational. You can set up associations and through the API you can ask a give node for its associations, but you cannot run queries across associations like you can when you do joins in a relational database.

Maybe you should add a location property to your content node and update its value with a behavior any time an association is created, updated, or deleted on that node. Then you'd be able to run a query by AND-ing the location with other criteria on the node.

Obviously, if you have many such properties that you need to keep in sync your behavior could start to affect performance negatively, but if you have only a handful you should be okay.

Sign up to request clarification or add additional context in comments.

1 Comment

Jeff, thanks. This is what we ended up doing, but somewhere deep inside I feel sad about it. We had the ambition to create a new solr index with our data, but it ended up being to tall of a montain to climb.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.