cancel
Showing results for 
Search instead for 
Did you mean: 

Can advice to config "share-config-custom.xml" file for advance search on ALF 7 community ?

Brayo
Champ on-the-rise
Champ on-the-rise

Hi, Everyone

i have use ALF 7.2 community edition on docker and try to setup advnaced search for my custom properties

someting in my path like web-extension/share-config-custom.xml

I try edited xml in UI "Look for "

<config replace="true" evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!-- Forms for the advanced search type list -->
<forms>
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<form labelId="custom" descriptionId="search.form.desc.ID_index_test">test:ID_index_test</form>
</forms>
</advanced-search>
</config>

When i pick "custom"

<config evaluator="model-type" condition="test:ID_index_test">
<forms>
<form id="search">
<field-visibility>
<show id="test:ID" />
<show id="test:num" />
<show id="test:dep" />
</field-visibility>
<appearance>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="test:ID">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="test:num">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="test:dep">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
</appearance>
</form>
</forms>
</config>

My UI along with this xml configuration

image

but when i try to search from ID, Number or  Department there is no result return.

What's i miss some configuration ?

Thanks

1 ACCEPTED ANSWER

abhinavmishra14
World-Class Innovator
World-Class Innovator

Take a look at this thread: https://hub.alfresco.com/t5/alfresco-content-services-forum/advanced-search-on-custom-model-properti...

Make sure you configure the index setting in your model correctly. Its by deafult free-text and that's why search may not be returning the result. Change it to any of the given list as appropriate. 

image

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

2 REPLIES 2

Brayo
Champ on-the-rise
Champ on-the-rise

@Brayo wrote:

Hi, Everyone

i have use ALF 7.2 community edition on docker and try to setup advnaced search for my custom properties

someting in my path like web-extension/share-config-custom.xml

I try edited xml in UI "Look for "

<config replace="true" evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!-- Forms for the advanced search type list -->
<forms>
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<form labelId="custom" descriptionId="search.form.desc.ID_index_test">test:ID_index_test</form>
</forms>
</advanced-search>
</config>

When i pick "custom"

<config evaluator="model-type" condition="test:ID_index_test">
<forms>
<form id="search">
<field-visibility>
<show id="test:ID" />
<show id="test:num" />
<show id="test:dep" />
</field-visibility>
<appearance>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="test:ID">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="test:num">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="test:dep">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
</appearance>
</form>
</forms>
</config>

My UI along with this xml configuration

image

but when i try to search from ID, Number or  Department there is no result return.

What's i miss some configuration ?

Thanks


This is my properties configuration.

image

image

abhinavmishra14
World-Class Innovator
World-Class Innovator

Take a look at this thread: https://hub.alfresco.com/t5/alfresco-content-services-forum/advanced-search-on-custom-model-properti...

Make sure you configure the index setting in your model correctly. Its by deafult free-text and that's why search may not be returning the result. Change it to any of the given list as appropriate. 

image

~Abhinav
(ACSCE, AWS SAA, Azure Admin)