AACsearch
Troubleshooting

Ingest failures

Documents pushed to AACsearch but never appear in search — diagnose buffer queue lag, schema mismatch, validation errors, and reindex pressure.

Ingestion is decoupled from indexing: a write enters SearchIngestBuffer, a worker picks it up and applies it to the live index. A "failure" can mean a 4xx at the API edge, a 4xx at the worker, or a stuck queue. Each has a different fix.

Symptom

What you seeWhere the issue is
4xx returned by sync/full, sync/delta, documents:batchEdge validation failed — request never enqueued
2xx returned but document does not appear after 2 minutesWorker rejected it (schema, type) or queue lag
Some documents appear, others do notPer-document validation; check the response errors[] field
Document count stuck after a jobWorker stalled or schema migration in progress

Decision tree

Did the API return 2xx?
  ├─ no  → fix the request body; see "Validation errors" below
  └─ yes → check buffer queue depth
            ├─ depth 0 → worker has processed it; check schema match
            └─ depth > 0 → wait; see "Queue lag" below

Check 1: API response

A successful enqueue returns { "enqueued": <n>, "errors": [] }. A partial-success returns the per-document errors:

{
	"enqueued": 998,
	"errors": [
		{
			"external_id": "product-123",
			"error": "validation_failed",
			"message": "Field 'price' expected float, got string"
		},
		{
			"external_id": "product-456",
			"error": "missing_field",
			"message": "Required field 'title' is missing"
		}
	]
}

Fix each row according to its error code. The other 998 are already on their way to the index.

Common validation errors

Error codeMeaningFix
validation_failedField type does not match schemaCast or coerce on the connector side
missing_fieldRequired field absentAdd it; or mark it optional in the index schema
payload_too_largeSingle document > 1 MBSplit or trim large text fields
batch_too_largeBatch > 1000 documentsSplit into multiple batches
unknown_field (warning, not failure)Extra field not in schemaEither add to schema or strip on the connector side

Check 2: buffer queue depth

If the API said enqueued: N but documents are not visible after 2 minutes, check the queue:

curl -X GET https://app.aacsearch.com/api/v1/projects/<projectId>/usage \
  -H "Authorization: Bearer aa_admin_..."

Response includes a bufferDepth for the org. Healthy depth is < 1000 most of the time. Sustained depth > 50,000 indicates the worker is throttled.

DepthMeaning
0Worker idle, all caught up
1–10,000Normal — typical lag < 30 s
10,000–50,000Catching up after a burst — typical lag < 5 min
> 50,000Worker throttled — see "Pressure" below

Check 3: schema mismatch

A document can pass edge validation but fail at the worker if a field type changed since the index schema was set. Worker rejections are surfaced in the dashboard:

Search → Indexes → the index → "Recent ingest errors" tab.

Common causes:

  • The connector started sending a new field that has no facet/type definition.
  • A field changed from string to string[] upstream.
  • A nested object got flattened differently than the schema expects.

Update the schema (admin API → PATCH /v1/indexes/<id>) and re-push the affected documents.

Check 4: reindex in progress

During a full reindex, the live alias is swapped at the end. While reindex is running, new writes are written to both the old and new collection. Writes are not lost, but you may see a temporary lag.

Check Search → Indexes → status. If status is reindexing, wait for it to complete. See reindexing and zero-downtime for the full lifecycle.

Check 5: connector specifics

If you are using a connector (PrestaShop, Bitrix, Postgres-sync), check the connector's last sync job:

curl -X GET https://app.aacsearch.com/api/v1/projects/<projectId>/sync-jobs \
  -H "Authorization: Bearer aa_admin_..."

Each row has a status: pending, running, completed, failed. Failed jobs include the underlying error and a sample document that failed.

Pressure: worker throttled

If bufferDepth is climbing into the hundreds of thousands and not draining, one of these is happening:

CauseFix
Plan-level concurrency cap reachedUpgrade plan or contact support to raise the per-org worker count
Upstream search engine slowCheck status page; contact support if our side is healthy
Large reindex consuming workerWait for reindex to finish; consider scheduling reindexes for off-peak
Many small batches (1 doc each)Switch to documents:batch with 100–1000 per request

Fix matrix

DiagnosisFix
Validation 4xx at edgeFix the request body using the per-row errors[]
Schema mismatchUpdate index schema, re-push affected docs
Queue lag < 5 minWait
Sustained queue lagSwitch to bigger batches; contact support if persistent
Reindex in progressWait for swap
Connector job failedInspect job; fix the connector or the source data

Diagnostics packet

FieldNotes
Organization IDrequired
Index slugrequired
Job IDfrom the sync response or sync-jobs list
bufferDepth snapshotrequired
Sample failed documentfull payload + the error/message from the response
When it startedUTC timestamp
Connector typeif applicable (PrestaShop, Bitrix, etc.)

Document IDs are deterministic from external_id. If you re-push the same external_id, it overwrites — no need to delete first.

On this page