Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
8812129
Initial plan
Copilot Feb 22, 2026
42395bc
Migrate SchemaDesignerAPI to JAX-RS V2 annotations
Copilot Feb 22, 2026
20f4431
Address code review feedback: fix copyFrom parameter shadowing and co…
Copilot Feb 22, 2026
de90529
Fix query() returning no results when sample docs not in memory (empt…
Copilot Feb 22, 2026
912c762
Fix schema designer download: correct URL, add Content-Disposition he…
Copilot Feb 23, 2026
7c16593
Fix query response structure: wrap SolrDocumentList in numFound/start…
Copilot Feb 23, 2026
b382a4c
Lint clean ups. "multivalued" is how we spell it ;-) Not "multi-val…
epugh Mar 6, 2026
233162e
code review and manual testing
epugh Mar 10, 2026
11f5209
track change
epugh Mar 10, 2026
6a46d40
Finally fix the visibility warning!
epugh Mar 10, 2026
bcb6a86
Restore surfacing indexing errors.
epugh Mar 10, 2026
115fccb
Fix error prone.
epugh Mar 10, 2026
6756865
Fix requireSchemaVersion to also reject negative values (restores -1 …
Copilot Mar 19, 2026
c7e0099
Merge remote-tracking branch 'upstream/main' into copilot/migrate-sch…
epugh Mar 19, 2026
810cb96
Merge branch 'copilot/migrate-schemadesignerapi-to-v2-annotations' of…
epugh Mar 19, 2026
c04147f
Move configSet from query parameter to path parameter in Schema Desig…
Copilot Mar 30, 2026
7f6274c
Use correct HTTP verbs in Schema Designer API (DELETE and PUT)
Copilot Mar 30, 2026
d05be2f
Move downloadConfig to reusable ConfigsetsApi.Download / DownloadConf…
Copilot Apr 2, 2026
0881dba
Move schema-designer download to generic configsets endpoint; add dis…
Copilot Apr 2, 2026
b021f15
Use our standard naming pattern that the Api is in the endpoint package
epugh Apr 2, 2026
9667896
Rework changelog
epugh Apr 2, 2026
91be03c
Use same style for all class intro javadocs.
epugh Apr 2, 2026
a3befe4
Update TestSchemaDesigner to use typed POJO return types
Copilot Apr 2, 2026
0520952
Add clarifying comment to setSchemaObjectField switch
Copilot Apr 2, 2026
9e3f38d
Replace FlexibleSolrJerseyResponse with typed POJOs in Schema Designe…
Copilot Apr 2, 2026
b52c891
Merge remote-tracking branch 'origin/copilot/migrate-schemadesignerap…
Copilot Apr 2, 2026
f53de8f
Add BATS integration test for Schema Designer API endpoints
Copilot Apr 2, 2026
13a2abf
Move getFileContents to ConfigsetsApi/GetConfigSetFile; add Configset…
Copilot Apr 2, 2026
b6a69de
Reduce mocking: use real FileSystemConfigSetService in configsets API…
Copilot Apr 2, 2026
42db2a3
Mention new capablities in solrj in changelog
epugh Apr 3, 2026
ac0a661
code review
epugh Apr 3, 2026
96efd9d
More test coverage
epugh Apr 3, 2026
46d3042
Prevent warning
epugh Apr 3, 2026
61f0689
Merge remote-tracking branch 'origin/main' into copilot/migrate-schem…
Copilot Apr 24, 2026
fa6fcad
Merge origin/main: pick up ConfigSets revamp (validation, isFileForbi…
Copilot Apr 24, 2026
c725d97
Keep only schema designer changes; remove configset additions; restor…
Copilot Apr 24, 2026
909988b
Merge remote-tracking branch 'upstream/main' into copilot/migrate-sch…
epugh Apr 24, 2026
c4c1e0e
Remove duplicate zipConfigSet from SchemaDesignerConfigSetHelper; use…
Copilot Apr 24, 2026
c0169a2
Remove downloadConfig from SchemaDesignerApi; JS uses ConfigsetsApi d…
Copilot Apr 24, 2026
8832e91
Be able to reuse download configset without magic property
epugh Apr 24, 2026
fa0f2c0
Typo fix! Lets be explicit
epugh Apr 24, 2026
ddba94e
Fix "inprog" error, mostly seen on Schema Designer.
epugh Apr 24, 2026
2216156
Be user facing!
epugh Apr 24, 2026
7b99a0d
Lets reuse a configset api for getting a single file
epugh Apr 24, 2026
0574d0f
tidy
epugh Apr 24, 2026
41d35ed
wordsmeith
epugh Apr 24, 2026
76da361
Merge remote-tracking branch 'upstream/main' into copilot/migrate-sch…
epugh May 6, 2026
ebb31ea
I hate that I added that super detailed unit test on inputs because t…
epugh May 6, 2026
a89880f
remove duplication of tests from bats and junit, follow our bats style
epugh May 8, 2026
9f1ca91
More User oriented title
epugh May 8, 2026
414d6a3
Move to seperate PR
epugh May 8, 2026
fdcfc5c
unclear the true value!
epugh May 8, 2026
b51d7c8
Refactor duplicates, found a fourth method that wasn't actually used,…
epugh May 8, 2026
ee50f7d
Some deeper docs on addErrorToResponse. This is definitly a unique …
epugh May 8, 2026
9c86ee8
Cleaning up old code, and comparign schema-designer.js to our java code.
epugh May 9, 2026
690dd9b
Actually support this in solrj (not jsut when js calsl the endpoint)
epugh May 9, 2026
bd30314
Revamp API with an eye to proper OpenAPI support.
epugh May 9, 2026
2bad425
SOLR-18110: Remove deprecated attributes for telemetry (#4524)
utsav00 Jun 18, 2026
86bc6f2
SOLR-14070: Deprecate CloudSolrClient ZkHost constructor (#4533)
dsmiley Jun 18, 2026
28ac2a5
SOLR-18167: Fix the original PR #4507 to cover more use cases in mapp…
epugh Jun 19, 2026
d79de34
SOLR-18286: dev-docs/changelog.adoc: document "type" (#4530)
abumarjikar Jun 20, 2026
f9f5abf
SOLR-17600: MapSerializable p4: Delete MapSerializable (#4466)
isaric Jun 21, 2026
33af791
SOLR-16341: fix blank file zip handling (#4249)
epugh Jun 21, 2026
46663ee
Merge remote-tracking branch 'upstream/main' into copilot/migrate-sch…
epugh Jun 21, 2026
95f7c16
Use the http verbs we have to be more restful and simplify urls
epugh Jun 21, 2026
1b79855
Use the http verbs we have to be more restful and simplify urls
epugh Jun 21, 2026
334d1fe
better name. This api is not currently used by any callers.
epugh Jun 21, 2026
b38c551
Description makes clear that this passes lots of solr query params th…
epugh Jun 21, 2026
37a4c23
try to make clear what we are doing.
epugh Jun 21, 2026
c5a9423
Reuse a standard response class!
epugh Jun 21, 2026
2536c8c
This is set globally, not needed on this.
epugh Jun 21, 2026
d20488a
Update this code to match what improvements had happened in seperate …
epugh Jun 21, 2026
38ef168
make clearer how this listing of /configs is different then the Confi…
epugh Jun 21, 2026
c788e95
Make code more robust sure, but is it needed?
epugh Jun 21, 2026
c4256e6
Explain what the heck is going on in this method!
epugh Jun 21, 2026
4832922
Suggestion from Jason on use of var.. I am not a var guy, but okay …
epugh Jun 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

title: Support blank/zero-byte files in configset zip uploads
type: fixed
authors:
- name: Eric Pugh
links:
- name: SOLR-16341
url: https://issues.apache.org/jira/browse/SOLR-16341
7 changes: 7 additions & 0 deletions changelog/unreleased/SOLR-17600.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Replace MapSerializable with MapWriter
type: other
authors:
- name: Ivan Šarić
links:
- name: SOLR-17600
url: https://issues.apache.org/jira/browse/SOLR-17600
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
title: Remove deprecated http.status_code and http.method telemetry tags from TraceUtils; use http.response.status_code and http.request.method instead.
type: removed
authors:
- name: Utsav Parmar
links:
- name: SOLR-18110
url: https://issues.apache.org/jira/browse/SOLR-18110
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
title: Schema Designer sample-doc analysis now works correctly when analyze sample documents.
type: fixed # added, changed, fixed, deprecated, removed, dependency_update, security, other
authors:
- name: Eric Pugh
links:
- name: SOLR-18152
url: https://issues.apache.org/jira/browse/SOLR-18152
35 changes: 35 additions & 0 deletions dev-docs/changelog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,41 @@ links:
url: https://issues.apache.org/jira/browse/SOLR-3333
----

=== Changelog Types Reference

[cols="1,2,3",options="header"]
|===
| Type | Description | When to Use (Examples)

| `added`
| For changes requiring a user to take action to use (opt-in).
| Could be completely new features or simply new configuration values on existing features. Typically documented in the Ref Guide.

| `changed`
| For improvements; not opt-in.
| Modifying behavior or performance of existing requests/configuration.

| `fixed`
| For improvements that are deemed to have fixed buggy behavior.
| Fixing a `NullPointerException`, correcting data corruption issues, or resolving UI glitches.

| `deprecated`
| For marking things deprecated.
| Declaring a configuration option, class, or API endpoint as deprecated ahead of a future removal.

| `removed`
| For code removed.
| Removing a previously deprecated parameter, class, or legacy module.

| `dependency_update`
| For updates to dependencies.
| Bumping third-party library versions (e.g., Lucene, Jetty, Jackson).

| `other`
| For anything else. Most such changes are too small/minor to bother with a changelog entry.
| Large/significant refactorings, build changes, test infrastructure, or documentation.
|===

=== 3.1 Tool to draft a YAML for your change

We have a gradle task that bootstraps a YAML file in the `changelog/unreleased/` directory. The task will use your current branch name as a file name and also title, and will
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.client.api.endpoint;

import static org.apache.solr.client.api.util.Constants.GENERIC_ENTITY_PROPERTY;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.extensions.Extension;
import io.swagger.v3.oas.annotations.extensions.ExtensionProperty;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.DefaultValue;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.QueryParam;
import java.io.InputStream;
import java.util.List;
import org.apache.solr.client.api.model.FlexibleSolrJerseyResponse;
import org.apache.solr.client.api.model.ListCollectionsResponse;
import org.apache.solr.client.api.model.SchemaDesignerAddRequestBody;
import org.apache.solr.client.api.model.SchemaDesignerConfigsResponse;
import org.apache.solr.client.api.model.SchemaDesignerInfoResponse;
import org.apache.solr.client.api.model.SchemaDesignerPublishResponse;
import org.apache.solr.client.api.model.SchemaDesignerResponse;
import org.apache.solr.client.api.model.SchemaDesignerSchemaDiffResponse;
import org.apache.solr.client.api.model.SchemaDesignerUpdateRequestBody;
import org.apache.solr.client.api.model.SolrJerseyResponse;

/** V2 API definitions for the Solr Schema Designer. */
@Path("/schema-designer")
public interface SchemaDesignerApi {

@GET
@Path("/{configSet}")
@Operation(
summary = "Get info about a configSet being designed.",
tags = {"schema-designer"})
SchemaDesignerInfoResponse getInfo(@PathParam("configSet") String configSet) throws Exception;

@POST
@Path("/{configSet}/prep")
@Operation(
summary = "Prepare a mutable configSet copy for schema design.",
tags = {"schema-designer"})
SchemaDesignerResponse prepNewSchema(
@PathParam("configSet") String configSet, @QueryParam("copyFrom") String copyFrom)
throws Exception;

@DELETE
@Path("/{configSet}")
@Operation(
summary = "Clean up temporary resources for a schema being designed.",
tags = {"schema-designer"})
SolrJerseyResponse cleanupTempSchema(@PathParam("configSet") String configSet) throws Exception;

@PUT
@Path("/{configSet}/file")
@Operation(
summary = "Update the contents of a file in a configSet being designed.",
tags = {"schema-designer"})
SchemaDesignerResponse updateFileContents(
@PathParam("configSet") String configSet,
@QueryParam("file") String file,
@RequestBody(
required = true,
extensions = {
@Extension(
properties = {
@ExtensionProperty(name = GENERIC_ENTITY_PROPERTY, value = "true")
})
})
InputStream fileContents)
throws Exception;

@GET
@Path("/{configSet}/sample")
@Operation(
summary = "Get a sample value and analysis for a field.",
tags = {"schema-designer"})
FlexibleSolrJerseyResponse getSampleValue(
@PathParam("configSet") String configSet,
@QueryParam("field") String fieldName,
@QueryParam("uniqueKeyField") String idField,
@QueryParam("docId") String docId)
throws Exception;

// TODO: this sub-resource belongs in ConfigsetsApi as GET
// /configsets/{configSetName}/collections;
// move it there in a follow-up so it is reusable outside the schema designer.
@GET
@Path("/{configSet}/collections")
@Operation(
summary = "List collections that use a given configSet.",
tags = {"schema-designer"})
ListCollectionsResponse listCollectionsForConfig(@PathParam("configSet") String configSet)
throws Exception;

@GET
@Path("/configs")
@Operation(
summary = "List all configSets available for schema design.",
description =
"Returns a filtered, de-duplicated view of configSets enriched with a per-configSet"
+ " status: 0 = draft only (no published version yet), 1 = published but schema"
+ " designer is disabled for it, 2 = published and designer is enabled. Internal"
+ " mutable copies (._designer_ prefix) and the default configSet are excluded.",
tags = {"schema-designer"})
SchemaDesignerConfigsResponse listDesignerConfigs() throws Exception;

@POST
@Path("/{configSet}")
@Operation(
summary = "Add a new field, field type, or dynamic field to the schema being designed.",
tags = {"schema-designer"})
SchemaDesignerResponse addSchemaObject(
@PathParam("configSet") String configSet,
@QueryParam("schemaVersion") Integer schemaVersion,
SchemaDesignerAddRequestBody requestBody)
throws Exception;

@PUT
@Path("/{configSet}")
@Operation(
summary = "Update an existing field or field type in the schema being designed.",
tags = {"schema-designer"})
SchemaDesignerResponse updateSchemaObject(
@PathParam("configSet") String configSet,
@QueryParam("schemaVersion") Integer schemaVersion,
SchemaDesignerUpdateRequestBody requestBody)
throws Exception;

@PUT
@Path("/{configSet}/publish")
@Operation(
summary = "Publish the designed schema to a live configSet.",
tags = {"schema-designer"})
SchemaDesignerPublishResponse publish(
@PathParam("configSet") String configSet,
@QueryParam("schemaVersion") Integer schemaVersion,
@QueryParam("newCollection") String newCollection,
@QueryParam("reloadCollections") @DefaultValue("false") Boolean reloadCollections,
@QueryParam("numShards") @DefaultValue("1") Integer numShards,
@QueryParam("replicationFactor") @DefaultValue("1") Integer replicationFactor,
@QueryParam("indexToCollection") @DefaultValue("false") Boolean indexToCollection,
@QueryParam("cleanupTemp") @DefaultValue("true") Boolean cleanupTempParam,
@QueryParam("disableDesigner") @DefaultValue("false") Boolean disableDesigner)
throws Exception;

/**
* Analyzes sample documents to suggest a schema.
*
* <p>Sample documents are read from the HTTP request body (not declared as a parameter on this
* interface — see {@code SchemaDesigner#loadSampleDocuments}) and dispatched to a parser based on
* the {@code Content-Type} header.
*/
@POST
@Path("/{configSet}/analyze")
@Operation(
summary = "Analyze sample documents and suggest a schema.",
description =
"Sample documents are supplied in the request body. The Content-Type header selects the"
+ " parser: application/json, text/xml or application/xml, text/csv or"
+ " application/csv, or text/plain or application/octet-stream (treated as JSON"
+ " lines). Capped at 5MB and 1000 documents.",
tags = {"schema-designer"})
SchemaDesignerResponse analyze(
@PathParam("configSet") String configSet,
@QueryParam("schemaVersion") Integer schemaVersion,
@QueryParam("copyFrom") String copyFrom,
@QueryParam("uniqueKeyField") String uniqueKeyField,
@QueryParam("languages") List<String> languages,
@QueryParam("enableDynamicFields") Boolean enableDynamicFields,
@QueryParam("enableFieldGuessing") Boolean enableFieldGuessing,
@QueryParam("enableNestedDocs") Boolean enableNestedDocs)
throws Exception;

@GET
@Path("/{configSet}/query")
@Operation(
summary = "Query the temporary collection used during schema design.",
description =
"All standard Solr query parameters (q, fq, fl, sort, facet.*, hl.*, etc.) are"
+ " forwarded directly to the temporary collection. The configSet path parameter"
+ " identifies which designer session to query; it is not a query parameter itself.",
tags = {"schema-designer"})
FlexibleSolrJerseyResponse query(@PathParam("configSet") String configSet) throws Exception;

@GET
@Path("/{configSet}/diff")
@Operation(
summary = "Get the diff between the designed schema and the published schema.",
tags = {"schema-designer"})
SchemaDesignerSchemaDiffResponse getSchemaDiff(@PathParam("configSet") String configSet)
throws Exception;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.client.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map;

/**
* Request body for the Schema Designer add endpoint. Exactly one of the four fields should be
* populated; the populated field's name is the action and its value carries the schema-object
* attributes (e.g. for {@code addField}: {@code name}, {@code type}, {@code stored}, etc.).
*/
public class SchemaDesignerAddRequestBody {

@Schema(name = "addField")
@JsonProperty("add-field")
public Map<String, Object> addField;

@Schema(name = "addDynamicField")
@JsonProperty("add-dynamic-field")
public Map<String, Object> addDynamicField;

@Schema(name = "addCopyField")
@JsonProperty("add-copy-field")
public Map<String, Object> addCopyField;

@Schema(name = "addFieldType")
@JsonProperty("add-field-type")
public Map<String, Object> addFieldType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.common;
package org.apache.solr.client.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/**
* This is to facilitate just in time creation of objects before writing it to the response.
*
* @deprecated Use {@link MapWriter} instead
*/
@Deprecated
public interface MapSerializable {
/** Response body for the Schema Designer list-configs endpoint. */
public class SchemaDesignerConfigsResponse extends SolrJerseyResponse {

/**
* Use the passed map to minimize object creation. Do not keep a reference to the passed map and
* reuse it. it may be reused by the framework
* Map of configSet name to status: 0 = in-progress (temp only), 1 = disabled, 2 = enabled and
* published.
*/
Map<String, Object> toMap(Map<String, Object> map);
@JsonProperty("configSets")
public Map<String, Integer> configSets;
}
Loading
Loading