Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom ACS 7.2 ContentModel Properties of type "d:content" are not indexed with ASS 2.0.3 #403

Closed
alexanderjakab opened this issue Aug 2, 2022 · 9 comments

Comments

@alexanderjakab
Copy link

alexanderjakab commented Aug 2, 2022

Since SearchServices 2.x custom ACS Content-Model Properties of type "d:content" are no longer indexed. This is a different behaviour from previous versions (e.g. ACS 6.2 & ASS 1.4.3) where all ContentModel Properties of type "d:content" of a Repository Node are Indexed by SearchServices. In 2.x only a node´s "cm:content" Property is indexed.

@aborroy my colleague @aitseitz already discussed this issue with you. for our project this is a major blocker for the upgrade to ACS 7.x. i would be grateful for any advice on a workaround or fix for this problem.

i uploaded a sample sdk 4.4 project to reproduce
sdk-sample-project.zip

steps to reproduce:

  1. startup the sdk docker setup from the sample project (extract and run ./run.sh build_start)

  2. attach a debugger and set a break-point in org/alfresco/repo/web/scripts/solr/NodeContentGet.class:77 to check the indexing of the nodes content
    image

  3. call the sample Webscript from your browser http://localhost:8080/alfresco/s/sample/helloworld

  4. in your nodebrowser the following node is created
    node

  5. the debugger stops when the solr Metadata Tracker requests the Content
    debugger-solr

observed behaviour:

  1. Only the Content for the "cm:content" property is requested by the MetadataTracker
  2. The "acme:metadataIndex" property of the node is never indexed.

expected behaviour:

  1. the Content for the "cm:content" property is requested by the MetadataTracker
  2. the Content for the "acme:metadataIndex" property is requested by the MetadataTracker. This would be the behavoiur we see in previous versions of SearchServices (e.g. 1.4.3)

additional information:
From checking the versions of the Class org.alfresco.solr.SolrInformationServer the behaviour is represented by the following implementation:

SearchServices 2.0.3
https://github.com/Alfresco/SearchServices/blob/master/search-services/alfresco-search/src/main/java/org/alfresco/solr/SolrInformationServer.java#L2714

image

previous SearchServices Version

private void addContentToDoc(SolrInputDocument doc, long dbId) throws AuthenticationException, IOException

image

@alexanderjakab alexanderjakab changed the title Custom ACS 7.2 Content Properties are not indexed with ASS 2.0.3 Custom ACS 7.2 ContentModel Properties of type "d:content" are not indexed with ASS 2.0.3 Aug 2, 2022
@aitseitz
Copy link

aitseitz commented Aug 2, 2022

Additional info from my side:

It looks like the changes in
https://github.com/Alfresco/SearchServices/blob/master/search-services/alfresco-search/src/main/java/org/alfresco/solr/SolrInformationServer.java#L2714
image
have been made back in january 2020 and might be accidently be done with merges related to the
consequence of the ContentStore removal.
See:
https://hub.alfresco.com/t5/alfresco-content-services-blog/search-services-2-0-0-release/ba-p/301308
https://alfresco.atlassian.net/jira/jira/browse/SEARCH-1702 (not accessable for us)

@aitseitz
Copy link

Official JIRA MNT-Ticket:
https://alfresco.atlassian.net/browse/MNT-23154

@alexanderjakab
Copy link
Author

following this issue only the documentation was added : https://docs.alfresco.com/search-services/latest/upgrade/breaking-changes-1.x/

@hi-ko
Copy link

hi-ko commented Aug 19, 2022

@kkono has a very interesting interpretation of the problem, classifying the no longer indexing of arbitrary d:content properties as enhancement.
The newly introduced restriction of indexing only to cm:content for performance reasons I think is overreaching. It could also be called an undocumented feature-removal, which is a problem without work around for many customers.

@alexanderjakab
Copy link
Author

thx @hi-ko. that is our interpretation as well . the suggested "workaround" in the documentation not only results in reimplementing customizations but also migrating all existing nodes using that model. basically we expect a fix for this ...

@aborroy
Copy link
Contributor

aborroy commented Aug 19, 2022

That documentation update was only the first step, to avoid potential users upgrading to Search Services 2.x experimenting this issue. We're working on getting this feature back to 2.x version, but it will take a while.
Thanks for your collaboration on this!

@hi-ko
Copy link

hi-ko commented Aug 19, 2022

Thanks @aborroy for the clarification.

We will have to wait or consider a downgrade to ASS 1.x. The work around described in the doc will not help us in many cases if the additional content properties should be handeled as an integral part of the node. It would be a bottomless pit to solve this with associations to hidden nodes and behaviors taking care of the consistency ...

@alexanderjakab
Copy link
Author

thx @aborroy for your update

@aitseitz
Copy link

@alexanderjakab
Refering to the Release Notes of Alfresco Search Services 2.0.5

image

The https://alfresco.atlassian.net/browse/MNT-23154
was fixed with this ASS 2.0.5.1 release:

https://community.hyland.com/products/alfresco/release-notes/release-notes/alfresco-search-services-module-releases/alfresco-search-services-version-205

If I'm correct the exact code merge commit is

b235787#diff-486bbf8e33aa92f77d955556566f862a0178db577259e8391d323e98791b5a74R240

which gives us the important information, that we need to change the property

# set it to true to allow custom d:content fields to be indexed.
# N.B. At most one content field can be indexed for each document
solr.enableIndexingCustomContent=true

in the
templates/rerank/conf/solrcore.properties
if we need custom "d:content" fields in the solr index!

See:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants