Skip to content

Commit

Permalink
Merge branch 'main' into noSimpleMap
Browse files Browse the repository at this point in the history
# Conflicts:
#	solr/solrj-zookeeper/src/java/org/apache/solr/common/LazySolrCluster.java
  • Loading branch information
dsmiley committed Nov 13, 2024
2 parents 6b3f5d0 + eef9bbc commit 0fba181
Show file tree
Hide file tree
Showing 114 changed files with 2,257 additions and 1,125 deletions.
6 changes: 5 additions & 1 deletion solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ Deprecation Removals

* SOLR-17352: Remove deprecated Solr CLI options. Run bin/solr yourcommand -h to see current options. (Eric Pugh, Christos Malliardis)

* SOLR-17256: Previously deprecated `SolrRequest` methods `setBasePath` and `getBasePath` have been removed. SolrJ users
wishing to temporarily override an HTTP client's base URL may use `Http2SolrClient.requestWithBaseUrl` instead. (Jason Gerlowski)

Dependency Upgrades
---------------------
(No changes)
Expand Down Expand Up @@ -227,7 +230,8 @@ led to the suppression of exceptions. (Andrey Bozhko)

* SOLR-17534: Introduce ClusterState.getCollectionNames, a convenience method (David Smiley)

* SOLR-17535: Introduce ClusterState.collectionStream to replace getCollectionStates and getCollectionsMap (David Smiley)
* SOLR-17535: Introduce ClusterState.collectionStream to replace getCollectionStates, getCollectionsMap,
and forEachCollection, which are now deprecated. (David Smiley)

* SOLR-17545: Upgrade to Gradle 8.10 (Houston Putman)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* 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 jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import org.apache.solr.client.api.model.CreateAliasRequestBody;
import org.apache.solr.client.api.model.SolrJerseyResponse;

@Path("/aliases")
public interface CreateAliasApi {
@POST
@Operation(
summary = "Create a traditional or 'routed' alias",
tags = {"aliases"})
SolrJerseyResponse createAlias(CreateAliasRequestBody requestBody) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@
import jakarta.ws.rs.DefaultValue;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.QueryParam;
import org.apache.solr.client.api.model.SchemaGetDynamicFieldInfoResponse;
import org.apache.solr.client.api.model.SchemaGetFieldInfoResponse;
import org.apache.solr.client.api.model.SchemaGetFieldTypeInfoResponse;
import org.apache.solr.client.api.model.SchemaInfoResponse;
import org.apache.solr.client.api.model.SchemaListCopyFieldsResponse;
import org.apache.solr.client.api.model.SchemaListDynamicFieldsResponse;
import org.apache.solr.client.api.model.SchemaListFieldTypesResponse;
import org.apache.solr.client.api.model.SchemaListFieldsResponse;
import org.apache.solr.client.api.model.SchemaNameResponse;
import org.apache.solr.client.api.model.SchemaSimilarityResponse;
import org.apache.solr.client.api.model.SchemaUniqueKeyResponse;
Expand All @@ -34,6 +42,67 @@
@Path(INDEX_PATH_PREFIX + "/schema")
public interface GetSchemaApi {

@Path(INDEX_PATH_PREFIX + "/schema")
interface Fields {

@GET
@Path("/fields")
@StoreApiParameters
@Operation(
summary = "List all non-dynamic fields in the schema of the specified core or collection",
tags = {"schema"})
SchemaListFieldsResponse listSchemaFields();

@GET
@Path("/fields/{fieldName}")
@StoreApiParameters
@Operation(
summary = "Get detailed info about a single non-dynamic field",
tags = {"schema"})
SchemaGetFieldInfoResponse getFieldInfo(@PathParam("fieldName") String fieldName);

@GET
@Path("/copyfields")
@StoreApiParameters
@Operation(
summary = "List all copy-fields in the schema of the specified core or collection",
tags = {"schema"})
SchemaListCopyFieldsResponse listCopyFields();

@GET
@Path("/dynamicfields")
@StoreApiParameters
@Operation(
summary = "List all dynamic-fields in the schema of the specified core or collection",
tags = {"schema"})
SchemaListDynamicFieldsResponse listDynamicFields();

@GET
@Path("/dynamicfields/{fieldName}")
@StoreApiParameters
@Operation(
summary = "Get detailed info about a single dynamic field",
tags = {"schema"})
SchemaGetDynamicFieldInfoResponse getDynamicFieldInfo(@PathParam("fieldName") String fieldName);

@GET
@Path("/fieldtypes")
@StoreApiParameters
@Operation(
summary = "List all field types in the schema used by the specified core or collection",
tags = {"schema"})
SchemaListFieldTypesResponse listSchemaFieldTypes();

@GET
@Path("/fieldtypes/{fieldTypeName}")
@StoreApiParameters
@Operation(
summary = "Get detailed info about a single field type",
tags = {"schema"})
SchemaGetFieldTypeInfoResponse getFieldTypeInfo(
@PathParam("fieldTypeName") String fieldTypeName);
}

@GET
@StoreApiParameters
@Operation(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* 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 jakarta.ws.rs.GET;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.QueryParam;
import java.util.List;
import org.apache.solr.client.api.model.ListLevelsResponse;
import org.apache.solr.client.api.model.LogLevelChange;
import org.apache.solr.client.api.model.LogMessagesResponse;
import org.apache.solr.client.api.model.LoggingResponse;
import org.apache.solr.client.api.model.SetThresholdRequestBody;

@Path("/node/logging")
public interface NodeLoggingApis {

@GET
@Path("/levels")
@Operation(
summary = "List all log-levels for the target node.",
tags = {"logging"})
ListLevelsResponse listAllLoggersAndLevels();

@PUT
@Path("/levels")
@Operation(
summary = "Set one or more logger levels on the target node.",
tags = {"logging"})
LoggingResponse modifyLocalLogLevel(List<LogLevelChange> requestBody);

@GET
@Path("/messages")
@Operation(
summary = "Fetch recent log messages on the targeted node.",
tags = {"logging"})
LogMessagesResponse fetchLocalLogMessages(@QueryParam("since") Long boundingTimeMillis);

@PUT
@Path("/messages/threshold")
@Operation(
summary = "Set a threshold level for the targeted node's log message watcher.",
tags = {"logging"})
LoggingResponse setMessageThreshold(SetThresholdRequestBody requestBody);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* 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 jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.QueryParam;
import java.io.IOException;
import org.apache.solr.client.api.model.FileListResponse;
import org.apache.solr.client.api.model.IndexVersionResponse;
import org.apache.solr.client.api.util.CoreApiParameters;

@Path("/cores/{coreName}/replication")
public interface ReplicationApis {

@GET
@CoreApiParameters
@Path("/indexversion")
@Operation(
summary = "Return the index version of the specified core.",
tags = {"replication"})
IndexVersionResponse fetchIndexVersion() throws IOException;

@GET
@CoreApiParameters
@Path("/files")
@Operation(
summary = "Return the list of index file that make up the specified core.",
tags = {"replication"})
FileListResponse fetchFileList(
@Parameter(description = "The generation number of the index", required = true)
@QueryParam("generation")
long gen);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* 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;

public class CategoryRoutedAliasProperties extends RoutedAliasProperties {
@JsonProperty("maxCardinality")
public Long maxCardinality;

@JsonProperty("mustMatch")
public String mustMatch;
}
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.model;

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

public class CreateAliasRequestBody {
@JsonProperty(required = true)
public String name;

@JsonProperty("collections")
public List<String> collections;

@JsonProperty("async")
public String async;

@JsonProperty("routers")
public List<RoutedAliasProperties> routers;

@Schema(
description =
"Parameters to be used for any collections created by this alias. Only used for 'routed' aliases",
name = "collCreationParameters")
@JsonProperty("create-collection")
public CreateCollectionRequestBody collCreationParameters;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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 java.util.List;

/** Response body for the `GET /api/cores/coreName/replication/files` API */
public class FileListResponse extends SolrJerseyResponse {
@JsonProperty("filelist")
public List<FileMetaData> fileList;

@JsonProperty("confFiles")
public List<FileMetaData> confFiles;

@JsonProperty("status")
public String status;

@JsonProperty("message")
public String message;

@JsonProperty("exception")
public Exception exception;
}
Loading

0 comments on commit 0fba181

Please sign in to comment.