A domain-specific search experience platform built on Next.js 14 and Elasticsearch 8.14+. Designed as a full-featured search operations console covering relevance tuning, ML model management, NER annotation, A/B experimentation, dynamic navigation, and business rules — comparable in scope to Coveo/Algolia/Elastic App Search but fully open and self-hosted.
Next.js 14 (App Router)
├── (admin)/* Admin console — all search ops tooling
├── (search)/* End-user search UI
└── api/* Server-side API routes → Elasticsearch proxy
All ML inference runs through Elasticsearch's native _ml/trained_models API. No external ML services required.
| Requirement | Version |
|---|---|
| Node.js | 18+ |
| Elasticsearch | 8.14+ |
| Elasticsearch License | Basic (core), Platinum (NLP/ML inference), Enterprise (Elastic Rerank on self-managed) |
| Python + Eland | For importing HuggingFace models (optional) |
git clone <repository-url>
cd search-platformnpm installCopy the example env file and fill in your Elasticsearch connection details:
cp .env.example .env.localEdit .env.local:
# Elasticsearch connection
ELASTICSEARCH_URL=http://localhost:9200
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=changeme
# Optional: Anthropic API key for AI-assisted features
ANTHROPIC_API_KEY=sk-ant-...For Elastic Cloud, use your Cloud endpoint URL and API key:
ELASTICSEARCH_URL=https://<deployment-id>.es.<region>.aws.elastic-cloud.com
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=<cloud-password>Using Docker:
docker run -d --name elasticsearch \
-p 9200:9200 \
-e "discovery.type=single-node" \
-e "ELASTIC_PASSWORD=changeme" \
-e "xpack.security.enabled=true" \
docker.elastic.co/elasticsearch/elasticsearch:8.14.0The seed script creates sample indices and loads example healthcare/insurance documents:
npm run seednpm run devnpm run build
npm run start| Page | Route | Description |
|---|---|---|
| Provider Search | /providers |
End-user search UI with filters, pagination, facets |
| Experience Builder | /experience |
Visual drag-and-drop search page composer |
| Connections | /connections |
Elasticsearch cluster connection manager |
| Schema Manager | /schema |
Index mapping viewer + Copy Mapping button |
| Relevance Tuning | /relevance |
BM25 field boost sliders, per-index tuning |
| Data Onboarding | /onboard |
Bulk document ingestion with field mapping |
| Web Crawler | /crawler |
URL-based web crawler with depth/domain config |
| Search Analytics | /analytics |
Query volume, zero-result rate, top queries |
| Page | Route | Description |
|---|---|---|
| Embedding Framework | /embeddings |
Dense/sparse vector field config, ELSER integration |
| Ontology Management | /ontology |
Synonym sets, entity hierarchies, concept graphs |
| Query Lab | /query-lab |
Interactive query builder with explain + scoring |
| Pipeline Studio | /pipeline |
Multi-stage query pipeline (6-stage example included) |
| Personalization & LTR | /personalization |
Signal capture, LTR feature weights, experiment configs |
| Page | Route | Description |
|---|---|---|
| ML Model Hub | /ml-hub |
Curated NLP model catalog + Eland import command generator |
| NER & Annotation | /annotation |
Entity recognition, zero-shot classification, business rule annotators |
| Query Intelligence | /query-intelligence |
Intent classification, query NER, rewrite rules pipeline |
| Dynamic Navigation | /dynamic-nav |
Signal-boosted facet reranking (equivalent to Coveo DNE) |
| A/B Experiments | /experiments |
Traffic-split testing with frequentist significance testing |
| Rules Engine | /rules-engine |
IF/THEN query rules — boosts, filters, synonym injection, redirects |
All NLP features require models to be deployed in Elasticsearch first.
pip install eland[pytorch]eland_import_hub_model \
--cloud-id $CLOUD_ID \
--es-username elastic \
--es-password $PASSWORD \
--hub-model-id elastic/distilbert-base-uncased-finetuned-conll03-english \
--task-type ner \
--starteland_import_hub_model \
--cloud-id $CLOUD_ID \
--es-username elastic \
--es-password $PASSWORD \
--hub-model-id cross-encoder/nli-deberta-v3-large \
--task-type zero_shot_classification \
--starteland_import_hub_model \
--cloud-id $CLOUD_ID \
--es-username elastic \
--es-password $PASSWORD \
--hub-model-id cross-encoder/ms-marco-MiniLM-L-6-v2 \
--task-type text_similarity \
--startDownload directly from Kibana → Machine Learning → Trained Models:
.elser_model_2— ELSER v2 sparse embedding (best for English retrieval).multilingual-e5-small— E5 multilingual dense embeddings
Note: Only TorchScript model format is supported for import. ONNX is not supported.
The platform ships pre-configured for health insurance search using crawled content from:
- FidelisCare (
web-www-fideliscare-org) — Medicaid, Essential Plan, Child Health Plus, HARP, Medicare - WellCare (
web-www-wellcare-com) — Medicare plans, prescription drug coverage
Fields available: title, url, body, description, domain, headings, language, depth, wordCount, path
The Rules Engine ships with 8 health insurance domain rules:
| Rule | Trigger | Actions |
|---|---|---|
| Medicaid eligibility escalation | contains "medicaid" | Inject synonym + boost member pages |
| Medicare → WellCare segment | contains "medicare" | Filter to /WellcareMedicare path |
| Find a doctor redirect | contains "find a doctor" | Redirect to provider search |
| Pharmacy synonym expand | contains "pharmacy" | Expand with formulary/drug terms |
| Child health synonym inject | contains "child" | Inject "Child Health Plus CHP" |
| HARP / behavioral health | regex `\b(HARP | behavioral)\b` |
| Enroll / sign up redirect | contains "enroll" | Redirect to renewal page |
| Spanish language flag | contains "español" | Filter to language:es docs |
Three experiments are pre-loaded against the insurance dataset:
| Experiment | Index | Metric | Status |
|---|---|---|---|
| Title Boost (title^3) vs BM25 baseline | fideliscare | CTR | Running |
| Medicaid vs Medicare path filter injection | fideliscare | Conversion | Running |
| Depth-weighted ranking (depth≤2, 1.5× boost) | wellcare | MRR | Draft |
search-platform/
├── app/
│ ├── (admin)/ # Admin console pages
│ │ ├── ml-hub/ # ML Model Hub
│ │ ├── annotation/ # NER & Annotation Studio
│ │ ├── query-intelligence/
│ │ ├── dynamic-nav/ # Dynamic Navigation Experience
│ │ ├── experiments/ # A/B Experiment Center
│ │ ├── rules-engine/ # Business Rules Engine
│ │ ├── pipeline/ # Pipeline Studio
│ │ ├── personalization/ # Personalization & LTR
│ │ ├── schema/ # Schema Manager
│ │ ├── relevance/ # Relevance Tuning
│ │ ├── query-lab/ # Query Lab
│ │ ├── embeddings/ # Embedding Framework
│ │ ├── ontology/ # Ontology Management
│ │ ├── analytics/ # Search Analytics
│ │ ├── connections/ # Connections
│ │ ├── crawler/ # Web Crawler
│ │ └── onboard/ # Data Onboarding
│ ├── (search)/
│ │ ├── providers/ # Provider Search UI
│ │ └── experience/ # Experience Builder
│ └── api/ # API routes → Elasticsearch
├── components/
│ ├── layout/
│ │ └── AppShell.tsx # Sidebar nav + PageHeader
│ └── ui/ # shadcn/ui components
├── lib/
│ └── elasticsearch.ts # ES client singleton
├── types/ # TypeScript type definitions
└── scripts/
└── seed.ts # Data seeding script
This platform implements capabilities equivalent to:
| Feature | Coveo | Algolia | Elastic | This Platform |
|---|---|---|---|---|
| Semantic Search | ML-based | NeuralSearch | ELSER / E5 | ELSER + E5 |
| NER | No | No | Open (HuggingFace) | DistilBERT CoNLL-03 |
| Zero-Shot Classification | No | No | Open | DeBERTa v3 / BART |
| Reranking | Proprietary | No | Elastic Rerank | MS-MARCO MiniLM |
| Query Suggestions | Query2Prod2Vec | Proprietary | Suggesters | Completion + rules |
| Dynamic Navigation | Collaborative filtering | Statistical | Custom | Signal affinity simulation |
| A/B Testing | Bayesian (Qubit) | Native | No native | Frequentist (z-score, p-value) |
| Business Rules | QREs | Rules | Query Rules API | IF/THEN rules engine |
| Custom Model Upload | No | No | Eland (TorchScript) | Eland import generator |
MIT