Platform
ScaiWave ScaiGrid ScaiCore ScaiBot ScaiDrive ScaiKey Models Tools & Services
Solutions
Organisations Developers Internet Service Providers Managed Service Providers AI-in-a-Box
Resources
Support Documentation Blog Downloads
Company
About Research Careers Investment Opportunities Contact
Log in

Search returns nothing

Symptom: Search for any word returns nothing#

If every query gives 0 hits, the Weaviate index is likely empty or missing.

Admin: check the collection:

bash
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
.venv/bin/python -c "
import asyncio
from app.config import Settings
from app.search.client import make_weaviate_client
async def main():
    s = Settings(); c = make_weaviate_client(s)
    col = c.collections.get(s.weaviate_collection)
    print('count:', col.aggregate.over_all(total_count=True).total_count)
    c.close()
asyncio.run(main())
"

If count: 0, run the backfill:

bash
1
.venv/bin/python scripts/backfill_search_index.py --execute --inline

If the count is reasonable but search still returns 0, check the embedding chain:

bash
1
.venv/bin/python scripts/scaigrid_service_token_smoke.py

If embed returns 401, ScaiGrid's auth path is broken. The search engine falls back to BM25-only automatically; queries return some results but ranked by BM25 only.

Symptom: Search misses messages older than X#

By default messages are indexed within ~2 seconds of being sent. If recent messages are searchable but old ones aren't, the historical backfill never ran. Same backfill command above.

If only messages older than ~3 months are missing, check whether your tenant has a retention policy:

bash
1
GET /v1/admin/ai-config | jq .data.retention_policy

Tenants can configure auto-archival; archived messages are preserved in the DB but excluded from search by default.

Symptom: Search returns hits but they're stale#

A message is in search results but with old content (or shows up after being redacted). Indexing is async; redaction takes a few seconds to propagate. Wait, then retry.

If it persists for > 1 minute, admin should run a targeted reindex:

bash
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Schedule for a specific event
.venv/bin/python -c "
import asyncio
async def main():
    from arq import create_pool
    from arq.connections import RedisSettings
    from app.config import Settings
    s = Settings()
    pool = await create_pool(RedisSettings.from_dsn(s.redis_url))
    await pool.enqueue_job('remove_from_index', event_id='<event-id>')
    await pool.aclose()
asyncio.run(main())
"

Same diagnostic, different collection (ScaiWaveNote). The notes backfill is a separate process; ask an admin to run it.

Symptom: Incognito-room messages don't appear#

By design. Incognito rooms have do_not_index=True on every event; they're never written to Weaviate. See Incognito rooms.

Cross-tenant gotcha#

If you're a federated participant, you see federated messages in your search (your server indexed them locally). You don't see the foreign side's full corpus. Search the other side from one of their users.

Updated 2026-05-17 13:10:03 View source (.md) rev 3