Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aitseitz/1b0ba80f8d555a80d15f45a1e10d2115 to your computer and use it in GitHub Desktop.
Save aitseitz/1b0ba80f8d555a80d15f45a1e10d2115 to your computer and use it in GitHub Desktop.
Alfresco Search Services Usefull Link & Query Collection
@aitseitz
Copy link
Author

aitseitz commented Apr 24, 2023

Basis Admin Queries for Alfresco Search Services 2.x

based on article https://docs.alfresco.com/search-services/latest/admin/monitor/#unindexed-transactions
and https://hub.alfresco.com/t5/alfresco-content-services-blog/how-many-content-remains-to-be-indexed/ba-p/312459

Solr Summary:

http://localhost:8983/solr/admin/cores?action=SUMMARY&wt=xml
or
http://localhost:8983/solr/admin/cores?action=SUMMARY&wt=json

Solr Report:

http://localhost:8983/solr/admin/cores?action=REPORT&wt=xml
or
http://localhost:8983/solr/admin/cores?action=REPORT&wt=json

Time Estimations - How long is the remaining time till the index is fully build?

First check would be the enterprise admin console
https://localhost:8443/alfresco/s/enterprise/admin/admin-searchservice
but this does not cover FullTextSearch estimations within the content of the documents.
The known FTS Status from ASS 1.x does not exist anymore within ASS 2.x. Therefore we can calulcate fulltext document index build estimation with the following queries

Query: Number of SOLR Documents with a different value:

http://localhost:8983/solr/alfresco/select?q=*&fq={!frange%20l=1%20u=1%20v=$equals}&equals=if(not(eq(LATEST_APPLIED_CONTENT_VERSION_ID,LAST_INCOMING_CONTENT_VERSION_ID)),1,0)&indent=on&wt=json

--> numFound should be 0 when solr Index is up2date

Query: Status of the nodes pending to be indexed or updated:

http://localhost:8983/solr/alfresco/select?q=*&fl=[cached]LATEST_APPLIED_CONTENT_VERSION_ID,LAST_INCOMING_CONTENT_VERSION_ID&fq={!frange%20l=1%20u=1%20v=$equals}&equals=if(not(eq(LATEST_APPLIED_CONTENT_VERSION_ID,LAST_INCOMING_CONTENT_VERSION_ID)),1,0)&indent=on&wt=json

Troubleshooting:

Query: Check content transform status:

http://localhost:8983/solr/#/alfresco/schema?field=content@s__tr_status@%7Bhttp:%2F%2Fwww.alfresco.org%2Fmodel%2Fcontent%2F1.0%7Dcontent

More in detail:

Query: Check for "no_transform"

This can happen if Alfresco starts without Transform-Services startet correctly...if new content is uploaded into alfresco solr will identify these nodes in the "no _transform" status

http://localhost:8983/solr/alfresco/afts?indent=on&q=cm:content.transformationStatus:no_transform&wt=json&facet=on&facet.field=cm:content.mimetype

Query: Check for "transform_failed"

This can happen if AIO Transformer has an OutOfMemoryException or is beeing shutdown while Alfresco is still running...

http://localhost:8983/solr/alfresco/afts?indent=on&q=cm:content.transformationStatus:transform_failed&wt=json&facet=on&facet.field=cm:content.mimetype

Navigation to Solr Query Tab, this can be specified further with querys like

'+content@s__tr_status@\{http\://www.alfresco.org/model/content/1.0\}content:transform_failed -boolean@s_@\{http\://www.alfresco.org/model/content/1.0\}isContentIndexed:false'
sort='content@s__size@\{http\://www.alfresco.org/model/content/1.0\}content asc'

image

or more advanced onces like:

'+content@s__tr_status@\{http\://[www.alfresco.org/model/content/1.0\}content:transform_failed](https://www.alfresco.org/model/content/1.0/%7Dcontent:transform_failed) +content@s__size@\{http\://[www.alfresco.org/model/content/1.0\}content:[1](https://www.alfresco.org/model/content/1.0/%7Dcontent:[1) TO 4194304] +content@s__mimetype@\{http\://[www.alfresco.org/model/content/1.0\}content:("application/xml"](https://www.alfresco.org/model/content/1.0/%7Dcontent:(%22application/xml%22) "application/pdf" "application/xslt+xml" "message/rfc822" "application/json") -boolean@s_@\{http\://[www.alfresco.org/model/content/1.0\}isContentIndexed:false'](https://www.alfresco.org/model/content/1.0/%7DisContentIndexed:false%27)
sort='content@s__size@\{http\://[www.alfresco.org/model/content/1.0\}content](https://www.alfresco.org/model/content/1.0/%7Dcontent) asc'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment