# Build and Optimize Search Systems

Search teams need reliable guidance across indexing, ranking, semantic retrieval, and evaluation. This skill provides practical workflows and examples for building and improving search systems.

## Install

```bash
npx skillstore add zl2023github/search-engineer
```

## Metadata

- Status: approved
- Slug: zl2023github-search-engineer
- Skillstore revision: r2
- Version status: missing
- Tree hash: caa4270fe470a2e499d8f456a2a50827fc4a23588666208e1048271bf107ae6c
- Author: zl2023github
- GitHub username: zl2023github
- License: MIT
- Repository: https://github.com/zl2023github/software-engineer-skills/tree/main/software-engineering/search-engineer
- Ref: 88a8e9a07f4c54ab105c1c41b6267c287146b07b
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 77
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/zl2023github-search-engineer
- Manifest: https://skillstore.pages.dev/api/skills/zl2023github-search-engineer/manifest

## Capabilities

- Guides Elasticsearch cluster setup, index mappings, analyzers, and basic query operations.
- Defines Milvus collections and approximate nearest neighbor indexes for vector search.
- Calculates NDCG and MAP metrics from ranked relevance data.
- Demonstrates Chinese query expansion, normalization, and custom dictionary configuration.
- Outlines embedding retrieval, document chunking, vector storage, and RAG context assembly.
- Analyzes search logs, A/B results, caching strategies, latency, clicks, and zero-result queries.

## Use Cases

- Plan a Search Platform: Compare keyword, vector, and hybrid designs, then define mappings, shards, analyzers, and evaluation criteria.
- Build a RAG Retriever: Select embeddings, chunk documents, configure vector retrieval, and define relevance measurements for a RAG pipeline.
- Diagnose Search Quality: Review zero-result queries, clicks, latency, and A/B metrics to identify practical ranking improvements.

## Prompt Templates

### Choose a Search Engine

```
Compare Elasticsearch, Solr, and Milvus for my dataset, query patterns, scale, latency target, and language requirements. Recommend one architecture with reasons.
```

### Design an Index

```
Design an Elasticsearch index for these fields: [fields]. Include mappings, analyzers, shard assumptions, filters, sorting, and a relevance evaluation plan.
```

### Investigate Relevance Problems

```
Analyze these search metrics and bad cases: [data]. Classify recall, ranking, tokenization, and latency issues. Propose prioritized experiments with success metrics.
```

### Architect Hybrid RAG Retrieval

```
Create a production design for hybrid RAG retrieval using [data source]. Specify chunking, embeddings, lexical recall, vector recall, reranking, caching, and evaluation.
```

## Limitations

- Examples are reference snippets and are not complete production deployments.
- The skill does not connect to or operate a search cluster automatically.
- It does not provide full ingestion pipelines, APIs, access controls, or monitoring infrastructure.
- Library versions and framework imports may require updates for the target environment.

## Best Practices

- Define representative queries and relevance judgments before tuning retrieval.
- Validate changes offline, then use controlled experiments with business and quality metrics.
- Pin dependencies, secure production services, and verify third-party artifacts before installation.

## Anti Patterns

- Do not select an engine before documenting data, query, scale, and latency requirements.
- Do not optimize only click-through rate without relevance and conversion safeguards.
- Do not copy example commands into production without authentication, backups, and environment review.

## Security Audit

- Audited at: 2026-07-24T00:00:47.82\+00:00
- Summary: The 25 external-command findings are false positives caused by Markdown code fences; the document does not use Ruby or shell backtick execution. The pinned third-party plugin installation is a genuine low-severity network and supply-chain risk because no checksum or signature verification is provided.

## Stats

- Views: 5
- Downloads: 6
- Favorites: 0
- Popularity score: 0
