cancel
Showing results for 
Search instead for 
Did you mean: 

How are Associations stored in Solr?

jmalmeida
Champ on-the-rise
Champ on-the-rise

Main question:

Within Alfresco we have the possibility to create connexions between documents through the associations (see Associations | Alfresco Documentation). I am investigating if it is possible to search for a given document based on the metadata of it's associations. For that I would like to understand if the associations in alfresco are stored in Solr and if they are, how?

Second related question:

Is there a way to index two alfresco documents as if they were Solr nested documents? Solr allows documents to be hierarchical and then be seached using the Block Join Query Parsers (Other Parsers - Apache Solr Reference Guide ). Is it possible to use that feature with alfresco?

5 REPLIES 5

kaynezhang
World-Class Innovator
World-Class Innovator

1.Alfresco only save parent-children association information in solr ,solr fiels named like PRIMARYPARENT/PARENT are used to save parent-children association information.
2.Regular node associations are not saved in solr ,they are only saved in db.

3.Alfresco solr index every node as a document and solr nested document is not used in alfresco solr.

4.As your requirement ,I think you can create an type which is used as an association purpose,and use cmis join query feature.

Thank you for your answer.

The problem is that I would like to use Solr for the search and not CMIS.

From what you are telling me there is no way to index documents as nested in Solr and query them with the Block join queries, without significantly modifying Alfresco indexer, right?

kaynezhang
World-Class Innovator
World-Class Innovator

Yes 

idwright
Star Collaborator
Star Collaborator

It's a bit of a hack but what you can do is to create an aspect that holds the properties of the associated document and then use behaviours to ensure that the aspects are applied and properties are kept consistent.

Then you can use search as you'll have all the properties on the same doc.

Thank you. 

The problem is that I would have many documents with the same property fields associated and, from my understanding, there cannot be more than one instance of an aspect per document.