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-co...
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
Solved! Go to Solution.
It should work, as the indexes for each property is by default enabled. Not sure if the documents which has custom properties are indexed or not. See if you can do a quick search for those documents based on name, tile etc.
A quick trick could be, to update any of the properties e.g. title, description etc and save the document. It will retry to index again. And then try to search in advance search again after a gap.
If it is still not working then try and do a full re-index if you do not have much content.
Also, Can you try to update and re-deploy your content model by adding index config. and see if it works ?
Please add/update this log config: log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug
To see if you can find any logs when you hit search.
Your updated content model:
<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>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</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>
<index enabled="true">
<tokenised>both</tokenised>
</index>
</property>
<property name="my:customerNumber">
<title>Customer Number</title>
<type>d:text</type>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="my:journeyCpvNumber">
<title>Journey CPV Number</title>
<type>d:text</type>
<multiple>true</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</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>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="my:serviceProviderString">
<title>Customer Number</title>
<type>d:text</type>
<multiple>true</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
</properties>
</type>
</types>
It could be possible that the values you are using are getting tokenized and when you are searching it expects the values to be provided as tokens. When you set the tokenised to both then it works for both cases. When tokenised is set to true then it tries to index the values as tokens based on space, special chars and punctuation etc. Enabling the debug logs would show what values are being sent in the query so you can identify the problem in a better way.
This is what the docs days:
Solr/Lucene index configuration. The indexing behaviour of each property can be configured. If we do not configure any indexing behaviour then the default configuration is:
<index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>true</tokenised></index>
This basically means that the default index configuration for properties is as follows:
Hi,
In my case, running Alfresco 5.2, I had to re-generate Solr indexes, but I'm in doubt because -as you say- NodeBrowser return results.
I guess there are no errors in your log files, right?.
Regards,
clv
Hi,
the logs to the standard output the containers produce do not show anything noteworthy as far as I can tell. But I have to admit that the default logging level does not result in a huge amount of logs. I already tried turning the solr logging level up and could not find anything that hints in the direction of my problem. I guess, I will try to turn up the logging level of share and the repository service and see if I can find something there.
Thanks for your input.
Kind regards,
Dennis
It should work, as the indexes for each property is by default enabled. Not sure if the documents which has custom properties are indexed or not. See if you can do a quick search for those documents based on name, tile etc.
A quick trick could be, to update any of the properties e.g. title, description etc and save the document. It will retry to index again. And then try to search in advance search again after a gap.
If it is still not working then try and do a full re-index if you do not have much content.
Also, Can you try to update and re-deploy your content model by adding index config. and see if it works ?
Please add/update this log config: log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug
To see if you can find any logs when you hit search.
Your updated content model:
<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>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</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>
<index enabled="true">
<tokenised>both</tokenised>
</index>
</property>
<property name="my:customerNumber">
<title>Customer Number</title>
<type>d:text</type>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="my:journeyCpvNumber">
<title>Journey CPV Number</title>
<type>d:text</type>
<multiple>true</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</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>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="my:serviceProviderString">
<title>Customer Number</title>
<type>d:text</type>
<multiple>true</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
</properties>
</type>
</types>
Hi,
thanks for your reply. This change is apparently not incremental which makes things a little tricky. But I will try it anyway. Just so I understand your fix better: Why would explicitly enabling indexing be necessary? The documentation states that when no <index>-Tag is defined on a property, the following default is assumed:
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>true</tokenised>
</index>
Is the documentation wrong or am I just misunderstanding things? See: https://docs.alfresco.com/6.1/references/dev-extension-points-content-model-define-and-deploy.html
Kind regards,
Dennis
Yes, Documentation is correct. You don't have to explicitly enable it. You can see i have set the tokenised value to false which is default true.
Thank you so much! I have no idea why but setting tokenized to "false" did the trick.
It could be possible that the values you are using are getting tokenized and when you are searching it expects the values to be provided as tokens. When you set the tokenised to both then it works for both cases. When tokenised is set to true then it tries to index the values as tokens based on space, special chars and punctuation etc. Enabling the debug logs would show what values are being sent in the query so you can identify the problem in a better way.
This is what the docs days:
Solr/Lucene index configuration. The indexing behaviour of each property can be configured. If we do not configure any indexing behaviour then the default configuration is:
<index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>true</tokenised></index>
This basically means that the default index configuration for properties is as follows:
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.