cancel
Showing results for 
Search instead for 
Did you mean: 

Search Problem

jeffreyman
Confirmed Champ
Confirmed Champ

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.cmisSmiley SurprisedbjectId = b.cmisSmiley SurprisedbjectId 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="gtsSmiley Tongueos-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>

5 REPLIES 5

EddieMay
World-Class Innovator
World-Class Innovator

Hi @jeffreyman 

Apologies for the delay in replying Man Frustrated

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"

image

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

thanks all, the problem is solved.

EddieMay
World-Class Innovator
World-Class Innovator

Hi @jeffreyman 

Great news that you've resolved your issue - could you tell us how?

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

Just to re-create the content model and it somehow works.

kaynezhang
World-Class Innovator
World-Class Innovator

Please paste your cmis query here