Skip to content
Back to skills

Search Indexing

ASecurity

"Operate and troubleshoot Gerev search, indexing, parsers, SQLite

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
databasespythonbashsqlfastapidockerapidatabasefrontend

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill search-indexing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Search Indexing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Search Indexing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-search-indexing/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-search-indexing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: search-indexing
description: "Operate and troubleshoot Gerev search, indexing, parsers, SQLite
  queues, ranking, and startup/status behavior."
metadata:
  disco-role: operating
disable-model-invocation: true
license: MIT
---

# Gerev Search and Indexing

Use this sub-skill when a task involves Gerev's search API, index maintenance, ranking stack, document parser helpers, SQLite-backed queues, or the startup/status behavior that makes search usable.

## Best-fit tasks

- Explain or debug `GET /api/v1/search` results, empty result sets, slow ranking, answer snippets, parent/child result nesting, or score interpretation.
- Reason about BM25, Faiss, SentenceTransformer, CrossEncoder, and Transformers QA model interactions without opening the source checkout.
- Inspect index persistence, SQLite queues, database/index file placement, and status counters.
- Diagnose startup failures caused by model cache downloads, NLTK data, CUDA availability, storage permissions, singleton indexes, or the current PDF parser import defect.
- Understand safe parser helper behavior for TXT, HTML, DOCX, PPTX, and PDF text extraction.

## Start here

1. Read [`search-indexing-stack.md`](references/search-indexing-stack.md) for the end-to-end flow, data model, parser map, queue behavior, index persistence, and startup/status route semantics.
2. For failures, use [`troubleshooting.md`](references/troubleshooting.md) first. It covers cold Hugging Face caches, NLTK `punkt`/`punkt_tab`, CUDA fallback, storage path issues, stale indexes, queue stalls, and the known `split_PDF_into_paragraphs` import defect.
3. When you have access to a Gerev checkout or storage directory, run the bundled [`inspect_search_indexing.py`](scripts/inspect_search_indexing.py) read-only helper from this sub-skill directory or with the equivalent path to the bundled script:

   ```bash
   python scripts/inspect_search_indexing.py --app-dir <checkout>/app --storage-dir <storage-dir> --sqlite-details
   ```

   Omit `--storage-dir` to let the helper infer Docker versus home storage. Add `--json` for machine-readable output or `--strict` when a CI-style nonzero exit is useful.

## High-signal routing checks

- Search import/startup touches model loading at import time through `models.py`; do not import the full app casually on a cold or offline host unless model caches are expected to exist.
- `search_logic.py` calls `nltk.download('punkt')` at import time. A downloader warning can be nonfatal when tokenizer data is already present, but missing `punkt` or `punkt_tab` will break BM25 tokenization on modern NLTK.
- `app/main.py` startup must create `FaissIndex` and `Bm25Index` singletons before search is used; direct calls to `search_documents()` without startup can raise "Index is not initialized".
- The current source contains an app-startup blocker: `indexing/index_documents.py` imports `split_PDF_into_paragraphs` from `parsers/pdf.py`, but `pdf.py` defines only `pdf_to_text` and `pdf_to_textV2`. Treat this as a source defect to document or fix only when the user authorizes code changes.
- Search/index storage is under `/opt/storage` in Docker-like mode and under a user home storage directory otherwise. Mismatched environment, user, or permissions can make the app appear to have no documents or no indexes.

## Boundaries

Included here: search query flow, BM25/Faiss ranking, transformer model loading, NLTK data, parser helpers, SQLite index/task queues, indexing background loop, SQLAlchemy search schemas, and the search/status/startup parts of the FastAPI app.

Do not use this sub-skill for connector credential setup, connector-specific API behavior, Docker image build/release automation, or frontend UX changes except where those surfaces directly affect search/status interpretation.

Files in this skill

  • SKILL.md3.7 KB
  • references/search-indexing-stack.md11.1 KB
  • references/troubleshooting.md7.6 KB
  • scripts/inspect_search_indexing.py12.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.