We are using Community Edition v6.2 and Search v1.4. We use model manager of "Admin Tools" to generate the custom model (custom types and custom aspects) and activate it.
We are managed to set the document to document type "TestDoc" and update the properties through Share UI. However, there are some problems when searching throught the Share UI or REST API.
1. We can search all custom documents using "TYPE:'gts:TestDoc" in Share UI or "select * from gts:TestDoc" using CMIS through REST API.
2. We can search a document using property of custom aspect. For example, "gts:name:'xxx'" in Share UI or "select * from cmis:document as a join gts:testAspect as b on a.cmisbjectId = b.cmisbjectId where b.gts:name = 'xxx'" through REST API.
3. When we try to search property of custom type such as gts:customer-name, it failed either on Share UI or REST API.
The properties of Custom Types can't be searched, but the properties of Custom Aspect. To my understanding, the properties of custom types should be searchable. Can someone help?
Here is the custom model XML.
<?xml version="1.0" encoding="UTF-8"?>
<model xmlns="http://www.alfresco.org/model/dictionary/1.0" name="gts:CustomDoc">
<description>test custom doc</description>
<author>jeffrey</author>
<imports>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
</imports>
<namespaces>
<namespace uri="http://www.gts.com.hk/model/document/1.0" prefix="gts"/>
</namespaces>
<data-types/>
<constraints/>
<types>
<type name="gts:TestDoc">
<title>Test Doc</title>
<description>test doc</description>
<parent>cm:content</parent>
<properties>
<property name="gts:customer-name">
<title>Customer Name</title>
<description>customer name</description>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="gts:ssa-number">
<title>SSA Number</title>
<description>SSA Number</description>
<type>d:text</type>
<mandatory>true</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="gts:mobile-number">
<title>Mobile Number</title>
<description>mobile number</description>
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
</properties>
<associations/>
<overrides/>
<mandatory-aspects/>
</type>
<type name="gts:TestDoc2">
<title>Test Doc2</title>
<parent>cm:content</parent>
<properties>
<property name="gts:ssa-number2">
<title>SSA Number</title>
<type>d:long</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
</index>
</property>
<property name="gtsos-status">
<title>POS Status</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>FALSE</tokenised>
<facetable>true</facetable>
</index>
<constraints>
<constraint name="gts:LIST_3ffb373d-3baf-4d5e-84f0-c6db9fc92cee" type="LIST">
<parameter name="allowedValues">
<list>
<value>Closed</value>
<value>Cancelled</value>
<value>Completed</value>
</list>
</parameter>
<parameter name="caseSensitive">
<value>true</value>
</parameter>
<parameter name="sorted">
<value>false</value>
</parameter>
</constraint>
</constraints>
</property>
<property name="gts:mobile-number2">
<title>Mobile NUmber</title>
<type>d:int</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
<index enabled="true">
<tokenised>TRUE</tokenised>
</index>
</property>
</properties>
<associations/>
<overrides/>
<mandatory-aspects/>
</type>
</types>
<aspects>
<aspect name="gts:arrival-date">
<title>Arrival Date</title>
<description>arrival date</description>
<properties/>
<associations/>
<overrides/>
<mandatory-aspects/>
</aspect>
<aspect name="gts:testAspect">
<title>test aspect</title>
<properties>
<property name="gts:name">
<title>Name</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
</properties>
<associations/>
<overrides/>
<mandatory-aspects/>
</aspect>
</aspects>
</model>
Hi @jeffreyman
Apologies for the delay in replying
I've created a custom model using the Share UI. This model inherits from cm:document & is called dc:Whitepaper following the example provided here.
This has a custom property dc:company & this is searchable in Share using the following approach:
dc:company:"Hyland"
HTH,
Please paste your cmis query here
thanks all, the problem is solved.
Hi @jeffreyman
Great news that you've resolved your issue - could you tell us how?
Cheers,
Just to re-create the content model and it somehow works.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.