How to add metadata field on Multi custom type to simple search and live search

cancel
Showing results for 
Search instead for 
Did you mean: 
phong_van
Active Member II

How to add metadata field on Multi custom type to simple search and live search

Dear everyone,

I've followed blogspot 

https://www.bluefishgroup.com/insights/ecm/adding-metadata-fields-to-simple-search-and-live-search-w...  and success to add metadata on one custom type on simple search and live search. But now I want to add metadata on Multi custom type. I've try add multi sub type on share-config-custom.xml file as

<types>
<type name="cm:content">
<subtype name="mc:loanDocs" />
<subtype name="mcSmiley SurprisedfficeDocs" />
</type>

<type name="cm:folder">
</type>

<type name="trx:transferTarget">
<subtype name="trx:fileTransferTarget" />
</type>
</types>

But when I've tried search on live search It seem only the first custom type is effected.

Anyone can help?

2 Replies
douglascrp
Advanced II

Re: How to add metadata field on Multi custom type to simple search and live search

The configuration you have just posted here has nothing to do with the types used in the search.

Those are used for the case where you want to change the type from A to B (specialize is the right term for this).

It is not clear for me what exactly you are trying to achieve.

phong_van
Active Member II

Re: How to add metadata field on Multi custom type to simple search and live search

Dear Mr Douglas,

Thanks for your reply,

About my question, I want end-user can search on metadata field of multi custom type at live search and simple search. I've 2 custom type

- the first name mcSmiley SurprisedfficeDocs as

<type name="mcSmiley SurprisedfficeDocs">
<title>Office Document</title>
<description>Các hồ sơ về văn bản ban hành</description>
<parent>cm:content</parent>
<properties>
<property name="mc:department">
<title>Department</title>
<description>Don vi ban hanh</description>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
</properties>
<associations/>
<overrides/>
<mandatory-aspects/>
</type>

- the second name mc:loanDocs as 

<type name="mc:loanDocs">
<title>Loan Document</title>
<description>Các hồ sơ cho vay: file scan cmnd, hợp đồng vay vốn, hóa đơn điện, nước, ...</description>
<parent>cm:content</parent>
<properties>
<property name="mc:loanTerm">
<title>Loan Term</title>
<description>Kỳ hạn vay (đơn vị tháng)</description>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mcSmiley TongueroductCode">
<title>Product Code</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mc:test">
<type>d:int</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
</index>
</property>
<property name="mc:refNumber">
<title>Reference Number</title>
<description>Số tham chiếu = Id của transaction nếu hồ sơ được upload từ hệ thống khác. Trường hợp hồ sơ được upload từ Process Maker = appId, trường hợp được upload từ Mobile = Id của transaction trên mobile</description>
<type>d:text</type>
<mandatory>true</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mc:idCardNumber">
<title>ID Card Number</title>
<description>Số chứng minh nhân dân của khách hàng (cm cũ 9 ký tự, mới 12 ký tự, cm quân đội tối đa 15 ký tự)</description>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
<constraints>
<constraint name="mc:LENGTH_0d057814-50bd-478d-8d6d-30c2b4b3689c" type="LENGTH">
<parameter name="maxLength">
<value>15</value>
</parameter>
<parameter name="minLength">
<value>9</value>
</parameter>
</constraint>
</constraints>
</property>
<property name="mc:contractNumber">
<title>Contract Number</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mc:refName">
<title>Reference Name</title>
<description>Thông tin tham chiếu bổ sung. Trên Process Maker = appNumber</description>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>true</facetable>
</index>
</property>
<property name="mc:customerName">
<title>Customer Name</title>
<description>Tên Khách hàng</description>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mc:loanAmount">
<title>Loan Amount</title>
<type>d:double</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>TRUE</tokenised>
</index>
</property>
<property name="mc:isScan">
<title>Is Scan</title>
<description>1/0 = Scan/Original: bản gốc or bản scan</description>
<type>d:boolean</type>
<mandatory>false</mandatory>
<default>true</default>
<index enabled="true">
<tokenised>TRUE</tokenised>
</index>
</property>
</properties>
<associations/>
<overrides/>
<mandatory-aspects/>
</type>

 

I've modified search.get.config.xml as

<search>
<default-operator>AND</default-operator>
<default-query-template>%(cm:name cm:title cm:description mc:refName mc:refNumber mc:customerName mc:idCardNumber mc:department ia:whatEvent ia:descriptionEvent lnk:title lnk:description TEXT TAG)</default-query-template>
</search>

- live-search-docs.get.config.xml file as

<search>
<default-operator>AND</default-operator>
<default-query-template>%(cm:name cm:title cm:description mc:refName mc:refNumber mc:customerName mc:idCardNumber mc:department TEXT TAG)</default-query-template>
</search>

share-config-custom.xml file as

<types>
<type name="cm:content">
<subtype name="mc:loanDocs" />
<subtype name="mcSmiley SurprisedfficeDocs" />
</type>

<type name="cm:folder">
</type>

<type name="trx:transferTarget">
<subtype name="trx:fileTransferTarget" />
</type>
</types>

When I restart server and try to search on live search It seem only the first custom type (mc:loanDocs) is can be search.

Can you help me?