cancel
Showing results for 
Search instead for 
Did you mean: 

Querying aspect properties with multiple entries

darkling235
Champ in-the-making
Champ in-the-making
I have a map being saved in Alfresco as a property. It keeps track of the count of certain elements in the XML. I.E. if it comes across one image references in the XML that have the element type WEB_THUMB, it will add to the mediaMap property WEB_THUMB=1.

Thing is I want to query on this and I have been unable to do so.

(PATH:"/app:company_home/cm:repository/cm:csmonitor/cm:article//*" ) AND +@\{http\://csmonitor.com/alfresco/model/csm/1.0\}mediaMap:WEB_THUMB=1 AND ( TYPE:"{http://www.alfresco.org/model/content/1.0}content" )


Doesn't work, I think theres a piece in the query I'm missing. Though the query does execute it doesn't return any results.

The details tab for the document in Alfresco looks like this:
Media Map: {WEB_THUMB=1, WEB_NORMAL=1}

Can anyone give me any advice? Thanks a lot
5 REPLIES 5

rivarola
Champ on-the-rise
Champ on-the-rise
I have a map being saved in Alfresco as a property

Hum… We tried it once, and it seemed to work. But when we tried cross-repository export/import of documents bearing such properties they were not accepted any more.
It will not help you much, but I think what you're trying to do is not possible.
Anyway, if you find a solution I'm interested by a clue.

darkling235
Champ in-the-making
Champ in-the-making
Can you be a bit more specific? These documents should be going into Alfresco and they won't be imported into any other Alfresco we didn't set up. I'm not sure I understand the problem.

Could you elaborate on the limitations of doing this?

rivarola
Champ on-the-rise
Champ on-the-rise
A map is not a dictionary type. It is correctly managed by Alfresco as long as it is a Serializable value, but if you export it in an ACP it cannot be reimported because it becomes considered as a string.
Did you try ACP export/import of your documents ?

darkling235
Champ in-the-making
Champ in-the-making
So how would you structure a query to search on a map entry?

rivarola
Champ on-the-rise
Champ on-the-rise
I don't know !
But I wanted to warn you about this approach. You may manage to index your map properties correctly in Lucene but I expect you'll have other problems, for instance the import/export behaviour.