Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

898 B
Raw Blame
// ============================================================
// Xerj Console backend — in-memory mock
//
// Re-exports the existing mock so the dashboards keep rendering
// when no real backend is reachable. The "MOCK DATA" status pill
// in the nav surfaces this state to the user.
// ============================================================

import { mock as mockData } from '../mock.js';

export const meta = {
  id: 'mock',
  label: 'Mock data',
  defaultBaseUrl: '',
  supports: { search: true, aggs: true, knn: true, semantic: true, hybrid: true, fsck: false },
};

export async function probe(_baseUrl, _signal) {
  return true; // mock is always "live"
}

export async function search(_baseUrl, dashId, ctx, _signal) {
  return mockData(dashId, ctx.range || '24H', {
    cluster: ctx.cluster || '',
    filters: ctx.filters || {},
    customRange: ctx.customRange || null,
  });
}