Skip to content

Omnisearch

Craft’s omnisearch is a unified search across every object in the catalog — satellites, planets, stars, deep sky objects, comets, radio frequencies, and rocket launches. It combines text matching with semantic vector search so you can find things by name, catalog ID, or natural language description.

Press Ctrl+K (or Cmd+K on macOS) anywhere in the Craft UI to open the command palette. Type your query and results appear instantly, grouped by object type.

Terminal window
curl "https://your-domain/api/search?q=weather+satellites+polar+orbit"
ParameterDefaultDescription
qrequiredSearch query (min 1 character)
typesallComma-separated type filter: satellite, star, dso, planet, comet, frequency, launch
limit20Maximum results (max 50)
modehybridSearch mode: hybrid, semantic, or text
Object typeSearchable fieldsExamples
SatellitesName, NORAD ID, international designator, groupISS, 25544, starlink, amateur
StarsName, catalog ID (HIP, HD, HR), spectral typeVega, HIP 91262, Polaris
Deep sky objectsName, catalog ID (Messier, NGC, IC), descriptionM31, NGC 7000, Andromeda
PlanetsNameMars, Jupiter, Saturn
CometsName, designationHalley, C/2023 A3
Radio frequenciesDescription, frequency value, modulation typeISS APRS, 145.825 MHz, FM repeater
Rocket launchesMission name, rocket name, launch providerFalcon 9, Crew Dragon, SpaceX

Prefix your query with a shortcut to restrict results to a single type:

ShortcutType
/satSatellites
/starStars
/dsoDeep sky objects
/launchRocket launches
/freqRadio frequencies
/cometComets

For example, /sat starlink searches only satellites, and /freq ISS searches only frequency records.

Omnisearch runs two search strategies in parallel and merges the results:

Standard substring matching using PostgreSQL’s ILIKE operator with a GIN trigram index. This is fast and exact — if your query is a substring of the object’s name or catalog ID, it will match.

Text search is good for:

  • Exact names (“ISS”, “M31”)
  • NORAD IDs (“25544”)
  • Partial names (“starli” matches “Starlink”)

When both strategies return results, the merge logic:

  1. Takes all semantic results first (higher priority, scored by vector distance)
  2. Adds text results that are not already present
  3. Boosts the score of any object found by both strategies
  4. Sorts by final score descending
  5. Truncates to the requested limit

The response includes a source field on each result ("semantic", "text", or "both") so you can see which strategy found it.

Each result includes:

{
"name": "ISS (ZARYA)",
"target_type": "satellite",
"target_id": "25544",
"description": null,
"magnitude": 1.0,
"score": 0.87,
"source": "both",
"groups": ["stations", "visual"],
"url": "/catalog/satellite/25544"
}

Satellite results are enriched with live altitude data when available — the altitude_deg field tells you whether the object is currently above the horizon.

The embedding pipeline runs automatically in the background:

  1. When you seed the database or when new objects arrive (TLE updates, launch data refreshes), each object’s search_text column is populated with a concatenation of its searchable fields.

  2. The pgai vectorizer worker container watches for new or updated search_text values.

  3. For each change, the worker sends the text to the GPU embedding endpoint (configured via GPU_BASE_URL and GPU_API_KEY in .env) and stores the resulting 1024-dimensional vector.

  4. The vectors are stored in dedicated embedding tables (satellite_embedding_store, celestial_object_embedding_store, target_frequency_embedding_store, rocket_launch_embedding_store).

After a fresh seed, the initial embedding generation for 22,000+ objects takes roughly 10 minutes. You can monitor progress:

Terminal window
docker compose exec db psql -U astrolock -d astrolock \
-c "SELECT * FROM ai.vectorizer_status;"
  • Be specific when you can — “ISS” is faster than “international space station” because the text index matches immediately
  • Use natural language for discovery — “satellites that photograph the Earth” works well with semantic search even though no satellite has that exact phrase in its name
  • Combine type shortcuts with descriptive queries/freq UHF downlink narrows results to frequency records matching “UHF downlink”
  • NORAD IDs are unambiguous — if you know the catalog number, searching for 25544 goes straight to the right object