---
audience: everyone
summary: You search for something you know is there, and get zero hits.
title: Search returns nothing
path: troubleshooting/search-returns-nothing
status: published
---

# 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
.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
.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
.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
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
# 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())
"
```

## Symptom: Notes don't appear in search

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](/docs/scaiwave/concepts/incognito-and-restricted).

## 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.
