Skip to content
DocsTry Aspire
DocsTry

SolrBuilderExtensions Methods

ClassMethods4 members
Extension methods for adding and configuring a Solr resource.
AddSolr(IDistributedApplicationBuilder, string, int?, string?)Section titled AddSolr(IDistributedApplicationBuilder, string, int?, string?)extensionIResourceBuilder<SolrResource>
Adds an Apache Solr container resource to the distributed application.
public static class SolrBuilderExtensions
{
public static IResourceBuilder<SolrResource> AddSolr(
this IDistributedApplicationBuilder builder,
string name,
int? port = null,
string? coreName = null)
{
// ...
}
}
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder.
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
portint?optionalThe host port for Solr.
coreNamestring?optionalThe name of the core to create.
IResourceBuilder<SolrResource>A reference to the ApplicationModel.IResourceBuilder`1.
WithConfigset(IResourceBuilder<SolrResource>, string, string)Section titled WithConfigset(IResourceBuilder<SolrResource>, string, string)extensionIResourceBuilder<SolrResource>
Specifies the path to the config set directory.
public static class SolrBuilderExtensions
{
public static IResourceBuilder<SolrResource> WithConfigset(
this IResourceBuilder<SolrResource> builder,
string configSetName,
string configSetPath)
{
// ...
}
}
builderIResourceBuilder<SolrResource>An ApplicationModel.IResourceBuilder`1 representing the Solr resource.
configSetNamestringThe name of the config set.
configSetPathstringPath to the config set directory.
IResourceBuilder<SolrResource>An ApplicationModel.IResourceBuilder`1 that can be used to further customize the resource.
WithDataBindMount(IResourceBuilder<SolrResource>, string, bool)Section titled WithDataBindMount(IResourceBuilder<SolrResource>, string, bool)extensionIResourceBuilder<SolrResource>
Adds a bind mount for the data folder to a Solr container resource.
public static class SolrBuilderExtensions
{
public static IResourceBuilder<SolrResource> WithDataBindMount(
this IResourceBuilder<SolrResource> builder,
string source,
bool isReadOnly = false)
{
// ...
}
}
builderIResourceBuilder<SolrResource>The resource builder.
sourcestringThe source directory on the host to mount into the container.
isReadOnlybooloptionalA flag that indicates if this is a read-only mount.
IResourceBuilder<SolrResource>The ApplicationModel.IResourceBuilder`1.
WithDataVolume(IResourceBuilder<SolrResource>, string?, bool)Section titled WithDataVolume(IResourceBuilder<SolrResource>, string?, bool)extensionIResourceBuilder<SolrResource>
Adds a named volume for the data folder to a Solr container resource.
public static class SolrBuilderExtensions
{
public static IResourceBuilder<SolrResource> WithDataVolume(
this IResourceBuilder<SolrResource> builder,
string? name = null,
bool isReadOnly = false)
{
// ...
}
}
builderIResourceBuilder<SolrResource>The resource builder.
namestring?optionalThe name of the volume. Defaults to an auto-generated name based on the application and resource names.
isReadOnlybooloptionalA flag that indicates if this is a read-only volume.
IResourceBuilder<SolrResource>The ApplicationModel.IResourceBuilder`1.