Hi everyone,
I am really at a loss here and could not find a solution to my problem here in the forums even though it seems others may have had similar problems.
I am running an Alfresco 6.1.2 stack including alfresco-search-services 1.3.0.1 in a dockerized environment. I really want to use records management so my customized stack is based on this: https://github.com/Alfresco/records-management/blob/master/rm-community/rm-community-share/docker-compose.yml
Due to infrastructure requirements I did some small modifications in terms of logging and modified the containers to run with different uids since we wanted the containers' users to map to preexisting users on our host machines.
All that seems to run just fine but when I define a custom model and run advanced search on one of my custom types, I always get no results unless I put an asterisk ( * ) in one of my custom properties. When using an asterisk I get all the documents of my custom type. This is a problem because a requirement in our case is for users to be able to search for documents using the defined custom properties. Has anyone encountered this problem and/or knows how to solve it?
My custom model looks something like this:
<?xml version="1.0" encoding="UTF-8"?>
<model name="my:invoices"
xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Content model for My Invoices</description>
<author>---</author>
<version>1.0</version>
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"></import>
<!-- Import Alfresco System Model Definitions -->
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"></import>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"></import>
</imports>
<namespaces>
<namespace uri="http://my.company.com/model/content/1.0" prefix="my"></namespace>
</namespaces>
<types>
<type name="my:invoice">
<title>Base invoice type</title>
<parent>cm:content</parent>
<properties>
<property name="my:invoiceNumber">
<title>Invoice Number</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:taggable</aspect>
</mandatory-aspects>
</type>
<type name="my:customerInvoice">
<title>Customer invoice type</title>
<parent>my:invoice</parent>
<properties>
<property name="my:customerName">
<title>Customer Name</title>
<type>d:text</type>
</property>
<property name="my:customerNumber">
<title>Customer Number</title>
<type>d:text</type>
</property>
<property name="my:journeyCpvNumber">
<title>Journey CPV Number</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
</properties>
</type>
<type name="my:serviceProviderInvoice">
<title>Service provider invoice type</title>
<parent>my:invoice</parent>
<properties>
<property name="my:serviceProviderName">
<title>Customer Name</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
<property name="my:serviceProviderString">
<title>Customer Number</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
</properties>
</type>
</types>
<aspects></aspects>
</model>
I deployed the model using the dynamic approach (https://docs.alfresco.com/6.1/tasks/deploy-dynamic.html) since it seemed to be the easiest way.
To make the model accessible in share, I added the following to my share-config-custom.xml :
<!-- Advanced search config -->
<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="my_invoices.type.my_customerInvoice.title" descriptionId="search.form.desc.my_customerInvoice">my:customerInvoice</form>
<form labelId="my_invoices.type.my_serviceProviderInvoice.title" descriptionId="search.form.desc.my_serviceProviderInvoice">my:serviceProviderInvoice</form>
</forms>
</advanced-search>
</config>
<!-- my:customerInvoice type (creating nodes) -->
<config evaluator="model-type" condition="my:customerInvoice">
<forms>
<!-- Search form -->
<form id="search">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:modified" />
<show id="cm:modifier" />
<show id="my:invoiceNumber" force="true" />
<show id="my:journeyCpvNumber" force="true" />
<show id="my:customerNumber" force="true" />
<show id="my:customerName" force="true" />
</field-visibility>
<appearance>
<set id="powerDFields" appearance="bordered-panel" label-id="form.set.label.powerd.properties.title"/>
<field id="my:invoiceNumber" label-id="my_invoices.property.my_invoiceNumber.title" set="powerDFields">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="my:journeyCpvNumber" label-id="my_invoices.property.my_journeyCpvNumber.title" set="powerDFields">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="my:customerNumber" label-id="my_invoices.property.my_customerNumber.title" set="powerDFields">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="my:customerName" label-id="my_invoices.property.my_customerName.title" set="powerDFields">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<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>
</appearance>
</form>
</forms>
</config>
<!-- my:serviceProviderInvoice type (creating nodes) -->
<config evaluator="model-type" condition="my:serviceProviderInvoice">
<forms>
<!-- Search form -->
<form id="search">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:modified" />
<show id="cm:modifier" />
<show id="my:invoiceNumber" force="true" />
<show id="my:serviceProviderString" force="true" />
<show id="my:serviceProviderName" force="true" />
</field-visibility>
<appearance>
<set id="powerDFields" appearance="bordered-panel" label-id="form.set.label.powerd.properties.title"/>
<field id="my:invoiceNumber" label-id="my_invoices.property.my_invoiceNumber.title" set="powerDFields">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="my:serviceProviderString" label-id="my_invoices.property.my_serviceProviderString.title" set="powerDFields">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="my:serviceProviderName" label-id="my_invoices.property.my_serviceProviderName.title" set="powerDFields">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<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>
</appearance>
</form>
</forms>
</config>
<!-- my:customerInvoice type (existing nodes) -->
<config evaluator="node-type" condition="my:customerInvoice">
<forms>
<!-- Default form configuration for the my:customerInvoice type -->
<form>
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:author" force="true" />
<show id="size" for-mode="view" />
<show id="cm:creator" for-mode="view" />
<show id="cm:created" for-mode="view" />
<show id="cm:modifier" for-mode="view" />
<show id="cm:modified" for-mode="view" />
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />
<show id="cm:categories" />
<!-- cm:dublincore aspect -->
<show id="cm:publisher"/>
<show id="cm:contributor"/>
<show id="cm:type"/>
<show id="cm:identifier"/>
<show id="cm:dcsource"/>
<show id="cm:coverage"/>
<show id="cm:rights"/>
<show id="cm:subject"/>
<!-- cm:complianceable aspect -->
<show id="cm:removeAfter" />
<!-- cm:effectivity aspect -->
<show id="cm:from"/>
<show id="cm:to"/>
<!-- cm:summarizable aspect -->
<show id="cm:summary" />
<!-- cm:translatable aspect -->
<show id="cm:translations" />
<!-- cm:localizable aspect -->
<show id="cm:locale" />
<!-- cm:ownable aspect -->
<show id="cm:owner" />
<!-- cm:attachable aspect -->
<show id="cm:attachments" />
<!-- cm:emailed aspect -->
<show id="cm:originator" />
<show id="cm:addressee" />
<show id="cm:addressees" />
<show id="cm:sentdate" />
<show id="cm:subjectline" />
<!-- exif:exif aspect -->
<show id="exif:dateTimeOriginal" />
<show id="exif:pixelXDimension" />
<show id="exif:pixelYDimension" />
<show id="exif:exposureTime" />
<show id="exif:fNumber" />
<show id="exif:flash" />
<show id="exif:focalLength" />
<show id="exif:isoSpeedRatings" />
<show id="exif:manufacturer" />
<show id="exif:model" />
<show id="exif:software" />
<show id="exif:orientation" />
<show id="exif:xResolution" />
<show id="exif:yResolution" />
<show id="exif:resolutionUnit" />
<!-- audio:audio aspect -->
<show id="audio:album" />
<show id="audio:artist" />
<show id="audio:composer" />
<show id="audio:engineer" />
<show id="audio:genre" />
<show id="audio:trackNumber" />
<show id="audio:releaseDate" />
<show id="audio:sampleRate" />
<show id="audio:sampleType" />
<show id="audio:channelType" />
<show id="audio:compressor" />
<!-- cm:indexControl aspect -->
<show id="cm:isIndexed" />
<show id="cm:isContentIndexed" />
<!-- cm:geographic aspect -->
<show id="cm:latitude" />
<show id="cm:longitude" />
<!-- surf:widget aspect -->
<show id="surf:widgetType"/>
<show id="surf:mid"/>
<show id="surf:label"/>
<!-- my:customerInvoice fields -->
<show id="my:invoiceNumber" />
<show id="my:journeyCpvNumber" />
<show id="my:customerNumber" />
<show id="my:customerName" />
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="my:invoiceNumber" label-id="my_invoices.property.my_invoiceNumber.title">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="my:journeyCpvNumber" label-id="my_invoices.property.my_journeyCpvNumber.title">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="my:customerNumber" label-id="my_invoices.property.my_customerNumber.title">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="my:customerName" label-id="my_invoices.property.my_customerName.title" />
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<set id="cm:content2cols" template="/org/alfresco/components/form/2-column-set.ftl" />
<field set="cm:content2cols" id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field set="cm:content2cols" id="size">
<control template="/org/alfresco/components/form/controls/size.ftl" />
</field>
<field set="cm:content2cols" id="cm:creator" />
<field set="cm:content2cols" id="cm:created" />
<field set="cm:content2cols" id="cm:modifier" />
<field set="cm:content2cols" id="cm:modified" />
<field id="cm:taggable">
<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>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
<field id="cm:originator" read-only="true" />
<field id="cm:addressee" read-only="true" />
<field id="cm:addressees" read-only="true" />
<field id="cm:sentdate" read-only="true" />
<field id="cm:subjectline" read-only="true" />
</appearance>
</form>
<!-- Document Library pop-up Edit Metadata form -->
<form id="doclib-simple-metadata">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />
<show id="cm:categories" />
</field-visibility>
<edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<field id="cm:taggable">
<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>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
</appearance>
</form>
<!-- Document Library Inline Edit form -->
<form id="doclib-inline-edit">
<field-visibility>
<show id="cm:name" />
<show id="cm:content" force="true" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="cm:content" label-id="">
<control>
<control-param name="editorAppearance">explorer</control-param>
<control-param name="forceEditor">true</control-param>
</control>
</field>
</appearance>
</form>
</forms>
</config>
<!-- my:servieProviderInvoice type (existing nodes) -->
<config evaluator="node-type" condition="my:servieProviderInvoice">
<forms>
<!-- Default form configuration for the my:servieProviderInvoice type -->
<form>
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:author" force="true" />
<show id="size" for-mode="view" />
<show id="cm:creator" for-mode="view" />
<show id="cm:created" for-mode="view" />
<show id="cm:modifier" for-mode="view" />
<show id="cm:modified" for-mode="view" />
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />
<show id="cm:categories" />
<!-- cm:dublincore aspect -->
<show id="cm:publisher"/>
<show id="cm:contributor"/>
<show id="cm:type"/>
<show id="cm:identifier"/>
<show id="cm:dcsource"/>
<show id="cm:coverage"/>
<show id="cm:rights"/>
<show id="cm:subject"/>
<!-- cm:complianceable aspect -->
<show id="cm:removeAfter" />
<!-- cm:effectivity aspect -->
<show id="cm:from"/>
<show id="cm:to"/>
<!-- cm:summarizable aspect -->
<show id="cm:summary" />
<!-- cm:translatable aspect -->
<show id="cm:translations" />
<!-- cm:localizable aspect -->
<show id="cm:locale" />
<!-- cm:ownable aspect -->
<show id="cm:owner" />
<!-- cm:attachable aspect -->
<show id="cm:attachments" />
<!-- cm:emailed aspect -->
<show id="cm:originator" />
<show id="cm:addressee" />
<show id="cm:addressees" />
<show id="cm:sentdate" />
<show id="cm:subjectline" />
<!-- exif:exif aspect -->
<show id="exif:dateTimeOriginal" />
<show id="exif:pixelXDimension" />
<show id="exif:pixelYDimension" />
<show id="exif:exposureTime" />
<show id="exif:fNumber" />
<show id="exif:flash" />
<show id="exif:focalLength" />
<show id="exif:isoSpeedRatings" />
<show id="exif:manufacturer" />
<show id="exif:model" />
<show id="exif:software" />
<show id="exif:orientation" />
<show id="exif:xResolution" />
<show id="exif:yResolution" />
<show id="exif:resolutionUnit" />
<!-- audio:audio aspect -->
<show id="audio:album" />
<show id="audio:artist" />
<show id="audio:composer" />
<show id="audio:engineer" />
<show id="audio:genre" />
<show id="audio:trackNumber" />
<show id="audio:releaseDate" />
<show id="audio:sampleRate" />
<show id="audio:sampleType" />
<show id="audio:channelType" />
<show id="audio:compressor" />
<!-- cm:indexControl aspect -->
<show id="cm:isIndexed" />
<show id="cm:isContentIndexed" />
<!-- cm:geographic aspect -->
<show id="cm:latitude" />
<show id="cm:longitude" />
<!-- surf:widget aspect -->
<show id="surf:widgetType"/>
<show id="surf:mid"/>
<show id="surf:label"/>
<!-- my:servieProviderInvoice fields -->
<show id="my:invoiceNumber" />
<show id="my:serviceProviderName" />
<show id="my:serviceProviderString" />
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="my:invoiceNumber" label-id="my_invoices.property.my_invoiceNumber.title">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="my:serviceProviderString" label-id="my_invoices.property.my_serviceProviderString.title">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="my:serviceProviderName" label-id="my_invoices.property.my_serviceProviderName.title" />
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<set id="cm:content2cols" template="/org/alfresco/components/form/2-column-set.ftl" />
<field set="cm:content2cols" id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field set="cm:content2cols" id="size">
<control template="/org/alfresco/components/form/controls/size.ftl" />
</field>
<field set="cm:content2cols" id="cm:creator" />
<field set="cm:content2cols" id="cm:created" />
<field set="cm:content2cols" id="cm:modifier" />
<field set="cm:content2cols" id="cm:modified" />
<field id="cm:taggable">
<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>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
<field id="cm:originator" read-only="true" />
<field id="cm:addressee" read-only="true" />
<field id="cm:addressees" read-only="true" />
<field id="cm:sentdate" read-only="true" />
<field id="cm:subjectline" read-only="true" />
</appearance>
</form>
<!-- Document Library pop-up Edit Metadata form -->
<form id="doclib-simple-metadata">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />
<show id="cm:categories" />
</field-visibility>
<edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<field id="cm:taggable">
<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>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
</appearance>
</form>
<!-- Document Library Inline Edit form -->
<form id="doclib-inline-edit">
<field-visibility>
<show id="cm:name" />
<show id="cm:content" force="true" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="cm:content" label-id="">
<control>
<control-param name="editorAppearance">explorer</control-param>
<control-param name="forceEditor">true</control-param>
</control>
</field>
</appearance>
</form>
</forms>
</config>I am fairly certain that my solr index works properly because when I open the node browser and run a cmis query like "select * from my:customerInvoice where my:customerNumer=<some existing number>", I get the expected result.
But when I try to do the same in advanced search by putting the number in the customerNumber search field, I get no results.
I would greatly appreciate any idea as to how I could resolve this issue. Thanks a lot!
Kind regards,
Dennis