Sign inSign up

jeci/pristy-search-services

By jeci

•Updated 6 days ago

Solr 9 search engine for Alfresco Community / Pristy ECM — fork of Alfresco Search Services

Image
0

1.8K

jeci/pristy-search-services repository overview

⁠Pristy Search Services

Community fork of Alfresco Search Services, modernized to run on vanilla Apache Solr 9.10.1 / Lucene 9.12.3 and Java 17. Enterprise components (Insight Engine, Zeppelin, governance services) have been removed, and the indexing trackers have been externalized into a separate service.

It is the search tier of Pristy ECM⁠, a community fork of Alfresco Community Edition, and works with a stock Alfresco Community repository just as well.


⁠Disclaimer

  • Not affiliated with Hyland / Alfresco. This is an independent community fork. It is not supported on Alfresco Enterprise and has no relationship with Hyland.
  • Built for Alfresco Community. Developed as part of the Pristy⁠ project, fully compatible with Alfresco Community Edition.
  • Support available. Jeci⁠ offers commercial support on Alfresco Community Edition, and specifically on this search module.

⁠Tags

TagContents
1.1.0, 1.0.0, …Released versions, cut from a Git tag. Use these.
latestMoves with the most recent release tag.
develop, stableHead of the corresponding branch. Unstable, for testing only.

⁠This image is half of the search tier

Unlike stock Alfresco Search Services, the indexing trackers do not run inside Solr. This image serves queries and stores the index; a second service, jeci/pristy-indexing-trackers⁠, reads nodes, ACLs and content from the Alfresco Repository and feeds them in.

Running this image alone gives you an empty index that never fills. The two services are deployed, restarted and tuned independently.

The Solr admin actions (SUMMARY, REPORT, REINDEX, PURGE, backup/restore…) also moved to the trackers service on port 8085. Solr itself stays vanilla, which is what makes future Solr upgrades tractable.

⁠Quick start

The stack below assumes an Alfresco Community repository already reachable at http://alfresco:8080/alfresco.

services:
  solr:
    image: jeci/pristy-search-services:1.1.0
    entrypoint: ["/opt/pristy-search-services/solr-init-core.sh"]
    environment:
      SOLR_ALFRESCO_HOST: alfresco
      SOLR_ALFRESCO_PORT: "8080"
      SOLR_SOLR_HOST: solr
      SOLR_SOLR_PORT: "8983"
      SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive
      ALFRESCO_SECURE_COMMS: secret
      JAVA_TOOL_OPTIONS: "-Dalfresco.secureComms.secret=please-change-me"
    ports:
      - "8983:8983"
    volumes:
      - solr-data:/opt/pristy-search-services/data
      - solr-home:/opt/pristy-search-services/solrhome
      - solr-backup:/backup/solr

  trackers:
    image: jeci/pristy-indexing-trackers:1.1.0
    environment:
      ALFRESCO_TRACKER_SOLR_URL: http://solr:8983/solr
      ALFRESCO_TRACKER_SOLR_COLLECTION: alfresco
      ALFRESCO_TRACKER_SOLR_SECURECOMMS: secret
      ALFRESCO_TRACKER_SOLR_SHAREDSECRET: please-change-me
      ALFRESCO_TRACKER_REPOSITORY_URL: http://alfresco:8080/alfresco
      ALFRESCO_TRACKER_REPOSITORY_SECURECOMMS: secret
      ALFRESCO_TRACKER_REPOSITORY_SHAREDSECRET: please-change-me
    ports:
      - "8085:8085"

volumes:
  solr-data:
  solr-home:
  solr-backup:

The entrypoint override is not optional. The image's inherited CMD starts Solr without creating any core, so a container left on the default command comes up healthy and answers nothing. solr-init-core.sh creates the cores listed in SOLR_CREATE_ALFRESCO_DEFAULTS on first start, and refreshes solr.xml on every start.

On the Alfresco side, the repository must point at both services:

-Dindex.subsystem.name=solr9
-Dsolr.host=solr           -Dsolr.port=8983
-Dsolr.tracker.host=trackers -Dsolr.tracker.port=8085
-Dsolr.secureComms=secret  -Dsolr.sharedSecret=please-change-me

The solr9 subsystem is provided by fr.pristy:pristy-search-subsystem-solr9, a resources-only JAR to drop into the repository's WEB-INF/lib. Without it, any Alfresco feature issuing an admin action reaches vanilla Solr and fails. See the administrator guide⁠.

⁠Environment variables

Read at first start only, when the cores are created:

VariableDefaultPurpose
SOLR_CREATE_ALFRESCO_DEFAULTSalfrescoComma-separated cores to create, e.g. alfresco,archive.
SOLR_TEMPLATErerankCore config template: rerank, or rerankRecent to favour recently modified documents (see below). An unknown name fails the start with the list of available templates.
SOLR_ALFRESCO_HOST / SOLR_ALFRESCO_PORTlocalhost / 8080Repository location written into solrcore.properties.
SOLR_SOLR_HOST / SOLR_SOLR_PORT—How the repository reaches this node.
ALFRESCO_SECURE_COMMS—none, secret or https.

Read at every start:

VariableDefaultPurpose
SOLR_DATA_DIR_ROOT/opt/pristy-search-services/dataIndex storage root.
SOLR_BACKUP_DIR/backup/solrBackup target, inside solr.allowPaths.
SOLR_BACKUP_CORESalfresco archiveSpace-separated cores whose $SOLR_BACKUP_DIR/<core> directory is created at start — Solr refuses to create it itself.
SOLR_HEALTHCHECK_REQUIRE_HEALTHY_CORESfalseCloud mode only: also fail the healthcheck while a core is not ACTIVE.
SOLR_SSL_KEY_STORE, SOLR_SSL_KEY_STORE_PASSWORD—PKCS12 keystore, enables Jetty-native TLS.
SOLR_SSL_TRUST_STORE, SOLR_SSL_TRUST_STORE_PASSWORD—PKCS12 truststore.
SOLR_SSL_NEED_CLIENT_AUTHfalseSet true for mutual TLS.
JAVA_TOOL_OPTIONS—Where -Dalfresco.secureComms.secret=… goes in secret mode.

secureComms=none additionally requires -Dalfresco.allowUnauthenticatedSolrEndpoint=true, otherwise the authentication plugin answers 403.

⁠Volumes

PathContents
/opt/pristy-search-services/dataLucene index and the data model cache.
/opt/pristy-search-services/solrhomesolr.xml, core definitions, per-core config.
/backup/solrBackup target. Mount a dedicated volume, on separate storage — a lost or saturated data volume must not take the backups with it.
/opt/pristy-search-services/keystorePKCS12 keystores for https mode. Never baked into the image.

Note that solrhome is a volume: Docker seeds image content into it only when it is named and empty. A solrhome created by an older image therefore keeps its original files across image upgrades, which is why solr-init-core.sh refreshes solr.xml from a pristine copy on every start.

⁠Core templates

TemplateRanking
rerankStock Alfresco ranking: textual relevance, re-ranked by phrase proximity.
rerankRecentSame, plus a recency component on cm:modified in the re-rank pass: a fresher document outranks an older one of equal relevance.

The template is chosen at core creation and recorded in core.properties. The rerankRecent weight and half-life are core properties (afts.recency.reRankWeight, afts.recency.decay, afts.recency.reRankDocs) in conf/solrcore.properties: edit them and RELOAD the core, no re-index needed.

⁠Healthcheck

The image declares a HEALTHCHECK on /solr/admin/info/health. It matters because Jetty keeps serving when Solr's CoreContainer fails to start: the container stays Up while every request answers 404, and only the health status shows it.

A 403 counts as healthy, since no secureComms mode exempts a path and the probe carries no secret. In https mode the probe presents the node's own certificate; if that certificate is server-only it cannot pass clientAuth=need and the container reports unhealthy — override the check in the orchestrator.

⁠Runtime facts

  • Exposed port: 8983
  • Runs as user solr, uid/gid 33007
  • Base image: alfresco/alfresco-base-java:jre17-rockylinux9
  • Solr modules enabled: analysis-extras only (the ICU chain the schema needs)
  • The stock Solr 9.10 admin console is served at /solr/
  • The Java SecurityManager is disabled — the Alfresco plugins need unrestricted file and network access

⁠Upgrading from Alfresco Search Services 2.x (Solr 6)

A full re-index is mandatory. The Lucene 9 index format cannot read a Solr 6 index, and several fields are now written differently. Plan for downtime of the search function, not of the repository. Sharding and FINGERPRINT search are not available in this release.

The full procedure, the configuration deltas and the list of behaviours that change are in the administrator guide⁠.

⁠Documentation

⁠License

LGPL v3 or later. Alfresco-derived sources keep their original Alfresco copyright and LGPL v3 headers; Solr-derived sources keep the Apache License 2.0. Third-party inventories ship in /licenses inside the image.

Issues and merge requests: https://gitlab.com/pristy-oss/pristy-search-services⁠

Tag summary

Content type

Image

Digest

sha256:906dec351…

Size

492.7 MB

Last updated

6 days ago

docker pull jeci/pristy-search-services