تخطَّ إلى المحتوى

search

هذا المحتوى غير متوفر بلغتك بعد.

Full-text search with PostgreSQL FTS and MeiliSearch. Free: MIT licensed.

Terminal window
nself plugin install search

Adds full-text search to your ɳSelf backend with two engines: built-in PostgreSQL FTS for simple search, and MeiliSearch for typo-tolerant, faceted search. Provides an index management API to define which Postgres tables and columns to index, and a unified search API that queries either engine.

Env VarDefaultDescription
SEARCH_PORT3302Search service port
SEARCH_ENGINEmeilisearchEngine: meilisearch or postgres
SEARCH_AUTO_INDEXtrueAuto-index on data changes
MEILISEARCH_HOSThttp://meilisearch:7700MeiliSearch endpoint
MEILISEARCH_MASTER_KEYnoneMeiliSearch master key
PortPurpose
3302Search service REST API
7700MeiliSearch (if SEARCH_ENGINE=meilisearch)

5 tables added to your Postgres database:

  • np_search_indices: index definitions
  • np_search_index_fields: indexed fields per index
  • np_search_documents: cached document store
  • np_search_queries: query analytics
  • np_search_synonyms: search synonym mappings
RouteTarget
/search/Search API
GET /health: Health check
POST /indices: Create an index
POST /indices/{name}/sync: Sync Postgres table to index
GET /search?q={query}: Search across all indices
GET /search/{index}?q= — Search a specific index