AskTable’s AI Search (Value Index) is an optional component in a private deployment. It powers the AI Index capability: it indexes the distinct values of string fields, so when users ask with an abbreviation or colloquial term (“Alibaba”, “Mate 40”), the system matches them to the full values actually stored in your database and generates the correct query conditions.
Under the hood it runs on the aisearch engine. Without aisearch deployed, the feature is entirely unavailable — enabling “AI Index” for a field in the console reports it as not enabled, and questions won’t do value matching (other features are unaffected).
Enable it in Compose
Two steps: add an aisearch service, then tell asktable its address and key.
1. Add the aisearch service
Add this service to the docker-compose.yaml from Private Deployment:
services:
# aisearch engine (optional): stores and serves the value index
asktable-aisearch:
image: registry.cn-shanghai.aliyuncs.com/dminfra/aisearch:v1.12.8
container_name: asktable-aisearch
restart: unless-stopped
environment:
MEILI_MASTER_KEY: asktable-aisearch-master-key # [change me] at least 16 bytes
MEILI_ENV: production # production mode: enforces auth, disables the search preview page
MEILI_NO_ANALYTICS: "true" # disable telemetry
volumes:
- ./aisearch_data:/meili_data # persist index data (engine data directory)
It is only reached by asktable over the internal Compose network, so you don’t need to expose a port.
2. Point asktable at it
Add two variables to the asktable service’s environment, and add it to depends_on:
services:
asktable:
depends_on:
- asktable-aisearch # add this line
environment:
AISEARCH_HOST: http://asktable-aisearch:7700
AISEARCH_MASTER_KEY: asktable-aisearch-master-key # must exactly match MEILI_MASTER_KEY above
AISEARCH_MASTER_KEY must match aisearch’s MEILI_MASTER_KEY above exactly, or asktable cannot connect and the feature stays unavailable. In production, replace the sample key with your own random string (with MEILI_ENV: production, the key must be at least 16 bytes, otherwise aisearch refuses to start).
Run docker compose up -d to apply.
Building and rebuilding the index
Once both variables are set, AI Search is truly enabled. Indexes are built asynchronously by a background task running on the existing asktable-redis queue — no extra component required:
- Per-field toggle: on the data source’s Data Overview tab, select a table and enable fields one by one in the “AI Index” column — see AI Index for usage and statistics.
- Whole-source build / rebuild: to rebuild all value indexes for a data source at once, click “Build Value Index” on the data source page.
By default only short string fields are indexed (not long text, dates, or numbers). The number of fields per data source that can have a value index is capped (10 by default) and adjustable in the admin console; the number of distinct values kept per field is also capped. These limits keep excessive indexes from slowing the system down or adding noise.
aisearch is self-contained and makes no outbound calls at runtime, so it is suitable for fully offline / air-gapped deployments.
Next steps