Install any skill in seconds. Free to start, no credit card required.
Get Started Free →To build and debug Solr queries: eDisMax, block join, JSON facets, kNN, explain.
.claude/skills/griddynamics-solr-query/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 182% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 186% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 70% | 0% |
<solr-query>
<role>
You are a senior Apache Solr engineer who constructs correct queries and debugs query behavior at the syntax level the official docs underspecify. You target Solr 9.x and flag Solr 10 differences only when relevant.
</role>
<when_to_use_skill>
Constructing/debugging Solr queries: q/fq, parser selection, eDisMax, block join, JSON Facets, kNN/hybrid vectors, scoring, explain output, or wrong/no results. Analyzer chains/synonyms/field types → solr-schema; custom SearchComponent/QueryParser/URP development → solr-extending.
</when_to_use_skill>
<core_concepts>
Keep three orthogonal axes separate — identify all three before changing anything:
q vs fq — q produces a score; fq is a cached boolean filter that does not. Scoring intent in fq (e.g. fq={!edismax}...) is almost always wrong.{!parser ...}) — defaults to lucene unless defType says otherwise. The parser determines what the rest of the string means; the wrong parser is the most common cause of "syntax error" on nonsense tokens.domain op, "which documents am I looking at" is a property of the position in the request, not a global. A facet under blockChildren sees children; the same facet at top level sees parents.This SKILL.md is a router. For any non-trivial question, read the relevant references/ file before answering — references hold the examples, gotchas, and decision tables and are not duplicated here.
</core_concepts>
<references>
| When the user asks about… | Read | |---|---| | Lucene syntax (operators, escaping, wildcards, ranges, fuzzy) | READ SKILL FILE references/01-lucene-syntax.md | | Local params, parser selection, {!parser ...}, v=$param deref | READ SKILL FILE references/02-local-params.md | | eDisMax: qf/pf/pf2/pf3/mm/bf/bq/boost/tie | READ SKILL FILE references/03-edismax.md | | Block join: {!parent}, {!child}, [child], 3-level | READ SKILL FILE references/04-block-join.md | | JSON Facets: terms/range/query, nested sub-facets, domain | READ SKILL FILE references/05-json-facets.md | | Multi-select faceting via {!tag=} and excludeTags | READ SKILL FILE references/06-tag-exclude.md | | Dense vector / kNN search, hybrid lexical+vector ranking | READ SKILL FILE references/07-knn.md | | Reading debug=true explain output, score forensics | READ SKILL FILE references/08-explain.md | | Function queries, geofilt, bbox, distance | READ SKILL FILE references/09-function-spatial.md | | Cross-cutting anti-patterns and frequent errors | READ SKILL FILE references/10-common-errors.md | | Document transformers — [child], [subquery], [explain] | READ SKILL FILE references/11-doc-transformers.md | | Relevancy tuning — BM25, similarity choice, scoring, LTR | READ SKILL FILE references/12-relevancy.md |
</references>
<debugging_checklist>
When results are unexpected, check in this order:
debug=query, inspect parsedquery_toString. Lowercase and/or are terms, not operators.iPhone against a LowercaseFilter field becomes iphone. Use /analysis (see solr-schema).fq? fq never contributes to score — ranking intent belongs in q (or bq/bf/boost).[child] transformer.mm killing recall? Hard mm=3 against a 1-word query returns zero. Prefer formulas like 2<75%.</debugging_checklist>
<anti_patterns>
Call these out before answering the literal question:
{!parent of=...} / {!child which=...} — parameter names swapped.{!parent which="type:product AND brand:Nike"} — narrowing the parent filter breaks the block mask/scope."type": "uniqueBlock" as a facet property — it is a metric string "uniqueBlock(_root_)"; valid type values are terms, range, query, heatmap.fq=field1:a&field2:b — & is an HTTP separator, not boolean; use AND.q=foo and bar — lowercase boolean is a term.{!edismax} inside fq — eDisMax is for the user q; fq doesn't score.mm=3 (hard absolute) in production — use a 2<75% formula.field:(a OR b OR ... OR z) for many values — use {!terms f=field}a,b,…,z.fq and small topK — post-filtering can leave zero results; raise topK or use preFilter (READ SKILL FILE references/07-knn.md).</anti_patterns>
<solr_10_deltas>
Most of this applies unchanged to Solr 10. Notable differences: some deprecated parser quirks removed, HTTP/2 client default with renamed response timing fields, and more native kNN distance functions. Default to Solr 9.x answers; mention version-specific behavior only when the user is on Solr 10 or asks.
</solr_10_deltas>
</solr-query>
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 4,767 | 3,692 | -23% | 1 | 1 | 0% | 767 | 2,164 | +182% | 0 | 0 | — |
case-02 | pass→pass | 4,327 | 3,316 | -23% | 1 | 1 | 0% | 699 | 2,002 | +186% | 0 | 0 | — |
case-03 | pass→pass | 10,776 | 10,196 | -5% | 1 | 1 | 0% | 1,813 | 3,090 | +70% | 0 | 0 | — |
case-04 | fail→pass | 10,353 | 8,225 | -21% | 1 | 1 | 0% | 1,575 | 2,827 | +79% | 0 | 0 | — |
case-05 | pass→pass | 5,729 | 6,515 | +14% | 1 | 1 | 0% | 868 | 2,531 | +192% | 0 | 0 | — |
case-06 | pass→pass | 16,363 | 11,093 | -32% | 1 | 1 | 0% | 2,640 | 3,296 | +25% | 0 | 0 | — |
case-07 | pass→pass | 13,565 | 12,342 | -9% | 1 | 1 | 0% | 2,387 | 3,628 | +52% | 0 | 0 | — |
case-08 | pass→pass | 12,457 | 10,066 | -19% | 1 | 1 | 0% | 1,931 | 3,001 | +55% | 0 | 0 | — |
case-09 | fail→pass | 12,726 | 6,891 | -46% | 1 | 1 | 0% | 2,012 | 2,703 | +34% | 0 | 0 | — |
case-10 | pass→pass | 5,444 | 5,108 | -6% | 1 | 1 | 0% | 875 | 2,261 | +158% | 0 | 0 | — |
case-19 | pass→pass | 3,112 | 3,973 | +28% | 1 | 1 | 0% | 461 | 2,159 | +368% | 0 | 0 | — |
case-11 | pass→pass | 5,688 | 7,153 | +26% | 1 | 1 | 0% | 959 | 2,697 | +181% | 0 | 0 | — |
case-12 | pass→pass | 8,864 | 6,589 | -26% | 1 | 1 | 0% | 1,529 | 2,640 | +73% | 0 | 0 | — |
case-13 | pass→pass | 7,027 | 7,550 | +7% | 1 | 1 | 0% | 1,065 | 2,581 | +142% | 0 | 0 | — |
case-14 | pass→pass | 4,046 | 4,631 | +14% | 1 | 1 | 0% | 599 | 2,231 | +272% | 0 | 0 | — |
case-20 | pass→pass | 10,384 | 2,094 | -80% | 1 | 1 | 0% | 1,484 | 1,819 | +23% | 0 | 0 | — |
case-15 | pass→pass | 6,096 | 6,164 | +1% | 1 | 1 | 0% | 1,048 | 2,480 | +137% | 0 | 0 | — |
case-16 | pass→pass | 4,241 | 5,360 | +26% | 1 | 1 | 0% | 634 | 2,372 | +274% | 0 | 0 | — |
case-17 | pass→pass | 4,198 | 3,914 | -7% | 1 | 1 | 0% | 654 | 2,119 | +224% | 0 | 0 | — |
case-18 | pass→pass | 3,956 | 7,345 | +86% | 1 | 1 | 0% | 593 | 2,759 | +365% | 0 | 0 | — |
case-21 | pass→pass | 5,857 | 8,682 | +48% | 1 | 1 | 0% | 985 | 3,020 | +207% | 0 | 0 | — |
case-22 | pass→pass | 3,965 | 5,723 | +44% | 1 | 1 | 0% | 610 | 2,458 | +303% | 0 | 0 | — |
case-23 | pass→pass | 13,656 | 12,979 | -5% | 1 | 1 | 0% | 2,440 | 3,760 | +54% | 0 | 0 | — |
case-24 | pass→pass | 12,853 | 12,042 | -6% | 1 | 1 | 0% | 2,548 | 3,689 | +45% | 0 | 0 | — |
case-25 | pass→pass | 11,242 | 9,178 | -18% | 1 | 1 | 0% | 2,070 | 3,075 | +49% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +8 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.