Find and fix problems in your index data
Relevan checks the data of each index for problems that hurt search. Examples are a field that most documents leave empty, or many documents with the same text. Each finding says what is wrong, gives the evidence, and gives the fix. Your agent can read the findings and work through them.
When the checks run
The checks run in the hour after a document write or a sitemap sync. They also run once a day. A check of the sitemap waits while a sync runs, because a sync resets the failed URLs.
The checks
| Kind | What it finds | Fix in |
|---|---|---|
field_sparse | A mapped field that most documents leave empty | source |
field_repeated_value | A text field with the same value in most documents | source |
main_text_thin | Documents whose main text is empty or very short | source |
documents_duplicate | Documents with the same text | source or index |
sitemap_url_failures | Sitemap URLs that Relevan cannot fetch, by reason | source |
sitemap_robots_disallowed | Sitemap URLs that robots.txt blocks | source |
sitemap_lastmod_missing | Sitemap entries with no lastmod | source |
sitemap_offsite_redirects | Sitemap URLs that redirect to a host that you did not verify | source |
The Relevan team can also add a finding by hand, for example after a review of your search logs.
Read the findings
curl "https://api.relevan.dev/v1/{orgId}/indexes/{indexName}/diagnostics?status=open" \
-H "Authorization: Bearer $RELEVAN_API_KEY"You can filter by status, severity, and fixIn. The most severe findings come first. Each finding has these fields:
severity:critical,warning, orinfo.evidence: the count of affected documents, the total, and sample document ids or URLs.fixIn:sourcemeans change the system that sends the documents.indexmeans change the index with the API.suggestedFix: an instruction for a source fix, or the exact API calls for an index fix.status:open,acknowledged,resolved, ordismissed.firstSeenandlastSeen: when a check found the problem first and last.
Act on a finding
A write API key can change the status of a finding:
POST .../diagnostics/{id}/acknowledge: someone works on the fix.POST .../diagnostics/{id}/resolve: the fix is done. If a later check finds the same problem, the finding opens again.POST .../diagnostics/{id}/dismiss: the finding does not apply to this index.
A check also resolves a finding when the problem is gone.
Dismiss a finding
Send a reason with each dismissal:
curl -X POST "https://api.relevan.dev/v1/{orgId}/indexes/{indexName}/diagnostics/{id}/dismiss" \
-H "Authorization: Bearer $RELEVAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "intended", "note": "Each product page uses the same description on purpose."}'The reasons are not_applicable, intended, false_positive, and other. The reason other needs a note. Relevan reads the reasons and the notes to improve the checks.
A dismissed finding stays dismissed until its evidence changes materially. It opens again when one of these occurs:
- The severity rises.
- The share of affected documents rises by 10 points or more.
- For a finding with no total, the affected count at least doubles.
With an AI assistant
The MCP server gives the same actions as tools: list_diagnostics, acknowledge_diagnostic, resolve_diagnostic, and dismiss_diagnostic. The server tells the agent to check the open findings before it tunes an index.