-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into SOLR-14496
- Loading branch information
Showing
422 changed files
with
2,967 additions
and
1,421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
solr/api/src/java/org/apache/solr/client/api/endpoint/CollectionPropertyApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* 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 io.swagger.v3.oas.annotations.Operation; | ||
import javax.ws.rs.DELETE; | ||
import javax.ws.rs.PUT; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
import org.apache.solr.client.api.model.SolrJerseyResponse; | ||
import org.apache.solr.client.api.model.UpdateCollectionPropertyRequestBody; | ||
|
||
/** V2 API definitions for modifying collection-level properties. */ | ||
@Path("/collections/{collName}/properties/{propName}") | ||
public interface CollectionPropertyApi { | ||
@PUT | ||
@Operation( | ||
summary = "Create or update a collection property", | ||
tags = {"collection-properties"}) | ||
SolrJerseyResponse createOrUpdateCollectionProperty( | ||
@PathParam("collName") String collName, | ||
@PathParam("propName") String propName, | ||
UpdateCollectionPropertyRequestBody requestBody) | ||
throws Exception; | ||
|
||
@DELETE | ||
@Operation( | ||
summary = "Delete the specified collection property from the collection", | ||
tags = {"collection-properties"}) | ||
SolrJerseyResponse deleteCollectionProperty( | ||
@PathParam("collName") String collName, @PathParam("propName") String propName) | ||
throws Exception; | ||
} |
79 changes: 79 additions & 0 deletions
79
solr/api/src/java/org/apache/solr/client/api/endpoint/CoreSnapshotApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* 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 io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import javax.ws.rs.DELETE; | ||
import javax.ws.rs.GET; | ||
import javax.ws.rs.POST; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
import javax.ws.rs.QueryParam; | ||
import org.apache.solr.client.api.model.CreateCoreSnapshotResponse; | ||
import org.apache.solr.client.api.model.DeleteSnapshotResponse; | ||
import org.apache.solr.client.api.model.ListCoreSnapshotsResponse; | ||
|
||
/** V2 API definitions for Creating, Listing, and Deleting Core Snapshots. */ | ||
@Path("/cores/{coreName}/snapshots") | ||
public interface CoreSnapshotApi { | ||
@POST | ||
@Path("/{snapshotName}") | ||
@Operation( | ||
summary = "Create a new snapshot of the specified core.", | ||
tags = {"core-snapshots"}) | ||
CreateCoreSnapshotResponse createSnapshot( | ||
@Parameter(description = "The name of the core to snapshot.", required = true) | ||
@PathParam("coreName") | ||
String coreName, | ||
@Parameter(description = "The name to associate with the core snapshot.", required = true) | ||
@PathParam("snapshotName") | ||
String snapshotName, | ||
@Parameter(description = "The id to associate with the async task.") @QueryParam("async") | ||
String taskId) | ||
throws Exception; | ||
|
||
@GET | ||
@Operation( | ||
summary = "List existing snapshots for the specified core.", | ||
tags = {"core-snapshots"}) | ||
ListCoreSnapshotsResponse listSnapshots( | ||
@Parameter( | ||
description = "The name of the core for which to retrieve snapshots.", | ||
required = true) | ||
@PathParam("coreName") | ||
String coreName) | ||
throws Exception; | ||
|
||
@DELETE | ||
@Path("/{snapshotName}") | ||
@Operation( | ||
summary = "Delete a single snapshot from the specified core.", | ||
tags = {"core-snapshots"}) | ||
DeleteSnapshotResponse deleteSnapshot( | ||
@Parameter( | ||
description = "The name of the core for which to delete a snapshot.", | ||
required = true) | ||
@PathParam("coreName") | ||
String coreName, | ||
@Parameter(description = "The name of the core snapshot to delete.", required = true) | ||
@PathParam("snapshotName") | ||
String snapshotName, | ||
@Parameter(description = "The id to associate with the async task.") @QueryParam("async") | ||
String taskId) | ||
throws Exception; | ||
} |
34 changes: 34 additions & 0 deletions
34
solr/api/src/java/org/apache/solr/client/api/endpoint/CreateCollectionApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* 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 io.swagger.v3.oas.annotations.Operation; | ||
import javax.ws.rs.POST; | ||
import javax.ws.rs.Path; | ||
import org.apache.solr.client.api.model.CreateCollectionRequestBody; | ||
import org.apache.solr.client.api.model.SubResponseAccumulatingJerseyResponse; | ||
|
||
/** V2 API definition for creating a SolrCloud collection */ | ||
@Path("/collections") | ||
public interface CreateCollectionApi { | ||
@POST | ||
@Operation( | ||
summary = "Creates a new SolrCloud collection.", | ||
tags = {"collections"}) | ||
SubResponseAccumulatingJerseyResponse createCollection(CreateCollectionRequestBody requestBody) | ||
throws Exception; | ||
} |
44 changes: 44 additions & 0 deletions
44
solr/api/src/java/org/apache/solr/client/api/endpoint/CreateReplicaApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* 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 io.swagger.v3.oas.annotations.Operation; | ||
import javax.ws.rs.POST; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
import org.apache.solr.client.api.model.CreateReplicaRequestBody; | ||
import org.apache.solr.client.api.model.SubResponseAccumulatingJerseyResponse; | ||
|
||
/** | ||
* V2 API definition for adding a new replica to an existing shard. | ||
* | ||
* <p>This API (POST /v2/collections/cName/shards/sName/replicas {...}) is analogous to the v1 | ||
* /admin/collections?action=ADDREPLICA command. | ||
*/ | ||
@Path("/collections/{collectionName}/shards/{shardName}/replicas") | ||
public interface CreateReplicaApi { | ||
|
||
@POST | ||
@Operation( | ||
summary = "Creates a new replica of an existing shard.", | ||
tags = {"replicas"}) | ||
SubResponseAccumulatingJerseyResponse createReplica( | ||
@PathParam("collectionName") String collectionName, | ||
@PathParam("shardName") String shardName, | ||
CreateReplicaRequestBody requestBody) | ||
throws Exception; | ||
} |
37 changes: 37 additions & 0 deletions
37
solr/api/src/java/org/apache/solr/client/api/endpoint/CreateShardApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* 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 io.swagger.v3.oas.annotations.Operation; | ||
import javax.ws.rs.POST; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
import org.apache.solr.client.api.model.CreateShardRequestBody; | ||
import org.apache.solr.client.api.model.SubResponseAccumulatingJerseyResponse; | ||
|
||
/** V2 API definition for creating a new shard in a collection. */ | ||
@Path("/collections/{collectionName}/shards") | ||
public interface CreateShardApi { | ||
|
||
@POST | ||
@Operation( | ||
summary = "Create a new shard in an existing collection", | ||
tags = {"shards"}) | ||
SubResponseAccumulatingJerseyResponse createShard( | ||
@PathParam("collectionName") String collectionName, CreateShardRequestBody requestBody) | ||
throws Exception; | ||
} |
42 changes: 42 additions & 0 deletions
42
solr/api/src/java/org/apache/solr/client/api/endpoint/InstallCoreDataApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* 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 io.swagger.v3.oas.annotations.Operation; | ||
import javax.ws.rs.POST; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
import org.apache.solr.client.api.model.InstallCoreDataRequestBody; | ||
import org.apache.solr.client.api.model.SolrJerseyResponse; | ||
|
||
/** | ||
* V2 API definition for installing an offline index to a single core of a shard. | ||
* | ||
* <p>This is an internal API intended for use only by the Collection Admin "Install Shard Data" | ||
* API. | ||
*/ | ||
@Path("/cores/{coreName}/install") | ||
public interface InstallCoreDataApi { | ||
|
||
@POST | ||
@Operation( | ||
summary = "Install an offline index to a specified core", | ||
tags = {"cores"}) | ||
SolrJerseyResponse installCoreData( | ||
@PathParam("coreName") String coreName, InstallCoreDataRequestBody requestBody) | ||
throws Exception; | ||
} |
Oops, something went wrong.