10-06-2016 06:18 PM
Hello All,
I am using alfresco 5.1.
I created a custom types that extends of cm:content like:
<types>
<type name="hip:hipDocType">
<title>My Document</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>hip:docMetaData</aspect>
</mandatory-aspects>
</type>
</types>
And create and advanced Search definition like:
<config evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<forms>
<!-- Custom type -->
<form labelId="MyDocument" descriptionId="My Document">hip:hipDocType</form>
</forms>
</advanced-search>
</config>
When I change the type of documents using a javascript function "doc.Spezialice()" the document appear in a normal search, and in any query executed directly on alfresco but never appear in the advanced search
BUT when I change some field manually I can get it.
In the past I solve this using only lucene indexation but now I thing that only can be used solr. Any help?
Best
Vladimir.
10-07-2016 03:05 AM
Can you provide the form configuration for your advanced search? I have seen issues where the form configuration included some fields that implicitly restricted the search results and confused the user/customer similar to what you described...
10-07-2016 12:55 PM
Many thanks Axel Faust
My configuration is:
<config evaluator="string-compare" condition="AdvancedSearch" replace="true">
<advanced-search>
<!-- advanced search Content type list -->
<content-types>
<type name="propertyMetaropertyDocType" />
(...)
</content-types>
<custom-properties>
<meta-data aspect="hip:docMetaData" property="docHip:HipDocID" />
<meta-data aspect="hip:docMetaData" property="docHiportfolioName" />
<meta-data aspect="hip:docMetaData" property="docHip:NDG" />
<meta-data aspect="hip:docMetaData" property="docHip:docType" />
<meta-data aspect="hip:docMetaData" property="docHipfficeCountry" />
<meta-data aspect="hip:docMetaData" property="docHip:docDate" />
</custom-properties>
<!-- Forms for the advanced search type list -->
<forms>
<!-- Custom types -->
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<form labelId="type.search.form.property.doc" descriptionId="Search for Properties Documents">propertyMetaropertyDocType</form>
(...)
</forms>
</advanced-search>
</config>
And forms definitions like:
<!-- Fields to appear in the advanced search when the type propertyMetaropertyDocType is selected -->
<config evaluator="model-type" condition="propertyMetaropertyDocType">
<forms>
<form>
<field-visibility>
<show id="docHip:HipDocID" force="true" />
<show id="cm:name" force="true" />
<show id="cm:title" force="true" />
<show id="cm:created" force="true" />
<show id="docHiportfolioName" force="true" />
<show id="docHip:NDG" force="true" />
<show id="docHipfficeCountry" force="true" />
<show id="docHip:docDate" force="true" />
</field-visibility>
</form>
<form id="search">
<field-visibility>
<show id="docHip:HipDocID" />
<show id="cm:name" force="true" />
<show id="cm:title" force="true" />
<show id="cm:created" force="true" />
<show id='cm:taggable' force='true' />
<show id="cm:categories" force="true" />
<!-- Propiedades basicas -->
<show id="docHiportfolioName" />
<show id="docHip:NDG" />
<show id="docHipfficeCountry"/>
<show id="docHip:docDate"/>
<!-- Propiedades Especficas-->
<show id="propertyMetaropertyPID" />
<show id="propertyMetaropertyDType" />
</field-visibility>
<appearance>
<set id="properties" appearance="panel" template="/org/alfresco/components/form/2-column-set.ftl" label="Basic Document Properties"/>
<field id="docHip:HipDocID" set="properties" label="Hipoges Doc. ID" />
<field id="cm:name" set="properties" label="Name" />
<field id="cm:title" set="properties" label="Title" />
<field id="cm:created" set="properties" label="Registration Date">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="cm:categories" set="properties" >
<control>
<control-param name="compactMode">true</control-param>
<control-param name="showSubCategoriesOption">true</control-param>
</control>
</field>
<field id="cm:taggable" set="properties" >
<control>
<control-param name="compactMode">true</control-param>
<control-param name="params">aspect=cm:taggable</control-param>
<control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
<control-param name="createNewItemIcon">tag</control-param>
</control>
</field>
<!-- Mis Propiedades-->
<set id="mis_properties" template="/org/alfresco/components/form/2-column-set.ftl" appearance="panel" label="Properties Documents/>
<field id="docHiportfolioName" set="mis_properties" label="Portfolio Name" />
<field id="docHip:NDG" set="mis_properties" label="Borrower ID" />
<field id="docHipfficeCountry" set="mis_properties" label="Office Country" />
<field id="docHip:docDate" set="mis_properties" label="Document Date">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="propertyMetaropertyPID" set="mis_properties" label="Property ID" />
<field id="propertyMetaropertyDType" set="mis_properties" label="Property Document Type" />
</appearance>
</form>
</forms>
</config>
10-07-2016 01:53 PM
You have quite a few custom properties there - are some of them d:boolean (checkbox-like) properties or have a list of values constraint (drop down box)? These are the most common types of properties that can cause the advanced search to filter more than intended and leave the result empty while a simple search finds the intended documents.
10-07-2016 02:41 PM
Yes i do not have booleans but several constraints.
Can you provide me some example/ trick to avoid the empty result?
Why can I get the nodes without any problem in the advanced search if I update using alfresco share, even using this configuration?
02-18-2018 05:54 AM
I have the same problem. A custom type derived from cm:folder with few fields with list of values, una date field and an integer field. How should I use advanced search?
I googled for an answer without success....
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.