Integrate Ordinator reranking service into Forgejo issue search #104
Labels
No labels
auth
bug
chore
ci/cd
dependencies
documentation
enhancement
feature
fix
graphics
tracking
vendor
workgroup
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kade/forgejo#104
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ordinator Reranking Integration
Overview
Integrate Ordinator reranking service into Forgejo issue search to improve search relevance using multi-factor scoring (semantic similarity, personalization, authority, recency).
Ordinator Service Status
/var/run/reynard/ordinator.sockGET /health- Service health checkPOST /rerank- Rerank search resultsGET /stats- Service statisticsservices/ordinator/DEPLOYMENT.mdIntegration Points
1. Go HTTP Client for Ordinator
Create a Go client package to communicate with Ordinator via Unix socket:
modules/ordinator/client.go2. Issue Search Integration
Modify issue search flow in Forgejo:
routers/api/v1/repo/issue.go-SearchIssues()3. Configuration
Add Ordinator configuration to Forgejo settings:
/var/run/reynard/ordinator.sockImplementation Plan
Create Go HTTP client for Unix socket communication
net.Dial("unix", socketPath)for Unix socketIntegrate into issue search
SearchIssues()inrouters/api/v1/repo/issue.goAdd configuration
modules/setting/setting.goTesting
Technical Details
Ordinator Rerank Request Format
Ordinator Rerank Response Format
Dependencies
References
services/ordinator/DEPLOYMENT.mdservices/ordinator/src/server.rsrouters/api/v1/repo/issue.gomodels/issues/issue_search.goTesting and Enhancements (April 30, 2026)
✅ COMPLETED: Testing suite and comparison logging added
Comparison Logging
User/Agent Influence Parameters
Added query parameters to influence reranking behavior:
ordinator_strategy: Custom reranking strategy (default: "default")ordinator_title_weight: Weight for title matching (float)ordinator_body_weight: Weight for body/content matching (float)Example usage:
Go Tests
Created comprehensive test suite for Ordinator integration:
Client Tests (
modules/ordinator/client_test.go):Integration Tests (
routers/api/v1/repo/issue_test.go):Test Results:
All unit tests pass successfully.
Code Changes
Modified Files:
routers/api/v1/repo/issue.go: Added comparison logging, query parameters, weights supportmodules/ordinator/client.go: Added Weights field to RerankRequestmodules/ordinator/client_test.go: Comprehensive test suite (new file)routers/api/v1/repo/issue_test.go: Integration test structure (new file)New Features:
log.Debug("Ordinator: Original issue order: %v", originalOrder)log.Debug("Ordinator: Reranked issue order: %v", rerankedOrder)log.Info("Ordinator: Issue order changed by reranking")ordinator_strategyquery paramordinator_title_weight,ordinator_body_weightquery paramsAI Editor Configuration
vendor/forgejo/to.codeiumignoreto exclude large vendored package.codeiumignoreas allowlist_file (already configured)Deployment
Research
Go Testing Best Practices:
References:
Next Steps
Integration Status (April 30, 2026)
✅ COMPLETED: Ordinator reranking service integrated into Forgejo issue search
Implementation Summary
modules/ordinator/client.gowith Unix socket communicationmodules/ordinator/ordinator.gowith configuration supportrouters/api/v1/repo/issue.goto rerank search results[ordinator]section to Forgejo app.ini with ENABLED=trueIntegration Details
/var/run/reynard/ordinator.sockPOST /rerankfor reranking search resultsConfiguration
Service Status
/var/run/reynard/ordinator.sockFiles Modified
vendor/forgejo/modules/ordinator/client.go- HTTP client for Unix socketvendor/forgejo/modules/ordinator/ordinator.go- Settings modulevendor/forgejo/routers/api/v1/repo/issue.go- Issue search integrationansible/roles/forgejo/templates/app.ini.j2- Configuration templateansible/roles/forgejo/tasks/main.yml- Fixed sly.so frontend conditionalTesting
Next Steps
close
Duplicate of #106. Closing to consolidate duplicate issues.