cancel
Showing results for 
Search instead for 
Did you mean: 

Properties specifc to each Node

shanks
Champ in-the-making
Champ in-the-making

Hi, 

I have a requirement where a node can have key / value paired properties, first I thought about the aspects but the properties which client want is bit different !!

What they want is a property where they can have any key and value property (key can be anything).

so I have created a web script which will add the custom property like this 

Map<QName, Serializable> propsMap = new HashMap<QName, Serializable>(); propsMap.put(QName.createQName("key"), "value");

nodeService.addProperties(new NodeRef("some node ref"), propsMap); 

I was successful creating properties like this !!, but they want to search based on these properties Smiley Sad

After that I have done little bit research and came to know that, In order to perform search operation the property should be present in alfresco dictionary model 

Now my question is, Is there any way I can have properties (which are specific to each node and not available to other nodes) and perform search operation ?? 


Any help would be great !!

1 ACCEPTED ANSWER

mrks_js1
Star Contributor
Star Contributor

No. The properties need to be registered properly via your custom model in order to be searchable.

but: you could define a property and put your key and value as value in there.

propsMap.put(QName.createQName("your_fixed_key"), key + ":" + value);

View answer in original post

1 REPLY 1

mrks_js1
Star Contributor
Star Contributor

No. The properties need to be registered properly via your custom model in order to be searchable.

but: you could define a property and put your key and value as value in there.

propsMap.put(QName.createQName("your_fixed_key"), key + ":" + value);