mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
* fix: redesign and compact Signed-off-by: Leonid Kaganov <lleo@lleo.me> * fix: comments Signed-off-by: Leonid Kaganov <lleo@lleo.me> * fix: correctly dropping connections in timeout Signed-off-by: Leonid Kaganov <lleo@lleo.me> * feature: loglevel in config Signed-off-by: Leonid Kaganov <lleo@lleo.me> * fix: loglevel in config Signed-off-by: Leonid Kaganov <lleo@lleo.me> * features lopt: direct personal messages between websockets by username Signed-off-by: Leonid Kaganov <lleo@lleo.me> * fix collaborator security query Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> * Fix svelte warnings Signed-off-by: Artem Savchenko <armisav@gmail.com> * Change log Signed-off-by: Artem Savchenko <armisav@gmail.com> * Add workspace permissions enum Signed-off-by: Artem Savchenko <armisav@gmail.com> * Add changelog Signed-off-by: Artem Savchenko <armisav@gmail.com> * Permission methods Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update core and account versions Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix predicate Signed-off-by: Artem Savchenko <armisav@gmail.com> * Add changelog Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix object clone Signed-off-by: Artem Savchenko <armisav@gmail.com> * Bump and add changelog Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix exception in getTypeOf Signed-off-by: Artem Savchenko <armisav@gmail.com> * Disable changelog check Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix failed to fetch errors in account client Signed-off-by: Artem Savchenko <armisav@gmail.com> * Clean up Signed-off-by: Artem Savchenko <armisav@gmail.com> * Support in-memory mode for hulypulse Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update platform-rig Signed-off-by: Artem Savchenko <armisav@gmail.com> * Comment change log verification Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update pnpm lock Signed-off-by: Artem Savchenko <armisav@gmail.com> * Sync with foundation Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update platform-rig Signed-off-by: Artem Savchenko <armisav@gmail.com> * Sync with foundation and bump versions Signed-off-by: Artem Savchenko <armisav@gmail.com> * Sync with foundations Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update and increment versions Signed-off-by: Artem Savchenko <armisav@gmail.com> * Skip change log verification Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix hulypulse connections Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix formatting and ci Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix validation warnings Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix formatting Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix validation Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix pnpm lock Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update versions Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update hulypulse version Signed-off-by: Artem Savchenko <armisav@gmail.com> --------- Signed-off-by: Leonid Kaganov <lleo@lleo.me> Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> Signed-off-by: Artem Savchenko <armisav@gmail.com> Co-authored-by: Leonid Kaganov <lleo@lleo.me> Co-authored-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
Fulltext Service
Fulltext indexing service for the Platform. Provides full-text search capabilities by indexing documents and communication messages.
Environment Variables
Required
SERVER_SECRET- Secret key for server authenticationDB_URL- Database connection URL (PostgreSQL or MongoDB)FULLTEXT_DB_URL- Elasticsearch connection URL (e.g.,http://localhost:9200)REKONI_URL- Rekoni service URL for content extraction (e.g.,http://localhost:4004)ELASTIC_INDEX_NAME- Name of the Elasticsearch index to useACCOUNTS_URL- Accounts service URL (e.g.,http://localhost:3000)
Optional
PORT- Service port (default:4700)MODEL_JSON- Path to model JSON file (default:model.json)HULYLAKE_URL- Hulylake service URL for communication indexing (default: empty string)- Required only if
COMMUNICATION_API_ENABLED=true
- Required only if
COMMUNICATION_API_ENABLED- Enable communication API for indexing messages (default: disabled)- Set to
'true'to enable indexing of communication messages from cards - When disabled, communication indexing is skipped even if
HULYLAKE_URLis provided
- Set to
ENABLE_CONSOLE- Enable console logging (default:'true')VERSION- Service version (default:'0.7.0')DB_PREPARE- Enable database prepared statements (default:'true')STORAGE_CONFIG- Storage configuration (see storage service documentation)
Features
- Full-text indexing of documents and attachments
- Communication message indexing (when
COMMUNICATION_API_ENABLED=true) - Elasticsearch integration for search
- Rekoni integration for content extraction from various file types
- Workspace-based indexing with automatic reindexing support
API Endpoints
PUT /api/v1/search- Search documentsPUT /api/v1/full-text-search- Full-text searchPUT /api/v1/index-documents- Index specific documentsPUT /api/v1/reindex- Reindex workspacePUT /api/v1/close- Close workspace indexer
Reindexing a Workspace
Using the Dev Tool (Recommended)
The easiest way to reindex a workspace is using the dev tool:
# Set FULLTEXT_URL environment variable
export FULLTEXT_URL=http://localhost:4700
# Reindex a specific workspace
rushx tool fulltext-reindex <workspace-name>
This sends a reindex event through the queue system, which is the recommended approach.
Using the API Directly
You can also call the reindex endpoint directly via HTTP:
Endpoint: PUT http://<fulltext-service-url>/api/v1/reindex
Request Body:
{
"token": "<workspace-token>",
"onlyDrop": false
}
Or use Authorization header:
curl -X PUT http://localhost:4700/api/v1/reindex \
-H "Authorization: Bearer <workspace-token>" \
-H "Content-Type: application/json" \
-d '{"onlyDrop": false}'
Parameters:
token(required): A valid token containing workspace information. Can be provided in the request body or asAuthorization: Bearer <token>header.onlyDrop(optional): Iftrue, only clears the index without reindexing. Default:false.
Note: The token must be generated with the workspace UUID and signed with the same SERVER_SECRET used by the fulltext service.
Communication API
When COMMUNICATION_API_ENABLED=true, the service will:
- Index communication messages from cards
- Use Hulylake service to fetch message groups and messages
- Require
HULYLAKE_URLto be set
When disabled (default), communication indexing is skipped, preventing errors if Hulylake is not available.