solr-extending

solr-extending is a skill for Claude Code, Codex from griddynamics/rosetta. It costs 23 tokens per session (1,896 once invoked), scanned A, original, Apache-2.0.

A guide for building custom Apache Solr plugins that add behavior to search requests or document indexing.

In plain words
What is it for?
Use it to build SearchComponents, query parsers, document transformers, update processors, value-source parsers, and request handlers.
Why use it?
It helps choose the correct extension point and avoid lifecycle, distributed-search, registration, packaging, and version problems.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/griddynamics/rosetta/solr-extending
Any agent
npx skills add griddynamics/rosetta --skill solr-extending
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for solr-extending

README.md
[![agentmods](https://agentmods.dev/badge/skills/griddynamics/rosetta/solr-extending.svg)](https://agentmods.dev/skills/griddynamics/rosetta/solr-extending)
Your own site
<a href="https://agentmods.dev/skills/griddynamics/rosetta/solr-extending"><img src="https://agentmods.dev/badge/skills/griddynamics/rosetta/solr-extending.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,896 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.01896
Opus 5 $0.00012 $0.00948
Sonnet 5 $0.00005 $0.00379
Haiku 4.5 $0.00002 $0.00190

Measured yesterday against content hash d20c359cd1c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

solr-extending scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

instructions/r3/core/skills/solr-extending/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a senior Apache Solr engineer who builds production-grade custom plugins. You know the request and indexing lifecycles, distributed-mode (SolrCloud) correctness, registration in solrconfig.xml, and classloader/version traps. You target Solr 9.x and flag Solr 10 differences only when relevant.

<when_to_use_skill>

Custom Solr plugins: SearchComponent, DocTransformer/TransformerFactory, QParser/QParserPlugin, UpdateRequestProcessor (URP), ValueSourceParser/function queries, RequestHandlerBase subclasses, plugin jar packaging, solrconfig.xml wiring. Query construction (eDisMax, block join, JSON Facets) or relevancy tuning (BM25, boosts) → USE SKILL solr-query; custom analyzers/tokenizers/filters → USE SKILL solr-schema.

</when_to_use_skill>

<core_concepts>

A Solr request flows through pluggable layers; picking the right extension point depends on when in the lifecycle you need to act:

  • Query path: RequestHandler → SearchHandler → components (QueryComponent → QParser/QParserPlugin for custom syntax; FacetComponent, HighlightComponent, DebugComponent, custom SearchComponents) → response applies DocTransformers per doc.
  • Indexing path: UpdateRequestHandler → UpdateRequestProcessorChain (custom URPs) → DistributedUpdateProcessor (SolrCloud) → RunUpdateProcessor (writes to Lucene).

Most plugins come in factory + instance pairs: the factory is registered once in solrconfig.xml, configured via init params, and creates a fresh instance per request. Solr reuses instances across threads — instance state must be immutable after init, thread-local, or synchronized.

This SKILL.md is a router. For any non-trivial question, read the relevant references/ file before answering — references hold the full examples, lifecycle details, and decision tables and are not duplicated here.

</core_concepts>

When the user asks about… Read
SearchComponent lifecycle (prepare/process), distributed mode, registration READ SKILL FILE references/01-search-component.md
DocTransformer / TransformerFactory — per-doc augmentation, examples READ SKILL FILE references/02-doc-transformer.md
QParser / QParserPlugin — custom query syntax READ SKILL FILE references/03-query-parser.md
UpdateRequestProcessor (URP) — indexing-time transformations READ SKILL FILE references/04-update-processor.md
ValueSourceParser — custom function queries for bf=/sort= READ SKILL FILE references/05-value-source-parser.md
solrconfig.xml wiring, jar packaging, classloading, version compat READ SKILL FILE references/06-plugin-wiring.md

<picking_the_extension_point>

You want to... Use
Add a request param that modifies how queries are processed SearchComponent
Add per-document fields to results (computed, fetched, formatted) DocTransformer
Support a new query syntax ({!myparser ...}) QParser
Compute something from doc fields usable in bf= / sort= ValueSourceParser
Modify documents during indexing (clean fields, derive values, dedupe) UpdateRequestProcessor
Wholly new request endpoint with custom output RequestHandlerBase subclass
Custom analyzer/tokenizer/filter (USE SKILL solr-schema)

The most common mistake is SearchComponent vs DocTransformer confusion:

  • DocTransformer runs per result doc — cheap for 10 docs, expensive for 1000+. Use it to enrich every result doc with data from another source.
  • SearchComponent runs once per request — can pre/post-process the entire response. Use it to filter/reorder/deduplicate the result set, or to inject into facet processing.

</picking_the_extension_point>

<lifecycle_hooks>

Method Called when
init(NamedList args) Once at factory load; configure from solrconfig.xml params
inform(SolrCore core) (if SolrCoreAware) Once after core fully loaded; safe to access schema, other components
prepare(...) Per-request setup (SearchComponent only)
process(...) Main work (SearchComponent)
transform(SolrDocument, int) Per-doc work (DocTransformer)
getQuery() / parse() Build Lucene Query (QParser)
processAdd/Delete/Commit Per-doc indexing (URP)
close() Resource cleanup

Read the full file on GitHub · 142 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 142 lines · 23 tokens per session scan A d20c359cd1c6

Subscribe to this mod's changes

solr-extending is a skill published in the GitHub repository griddynamics/rosetta (342 stars, last pushed yesterday), licensed Apache-2.0. It adds 23 tokens to every session and 1,896 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.