Skip to content
Docs Try Aspire
Docs Try

SolrBuilderExtensions Methods

Class Methods 4 members
Extension methods for adding and configuring a Solr resource.
AddSolr(IDistributedApplicationBuilder, string, int?, string?) Section titled AddSolr(IDistributedApplicationBuilder, string, int?, string?) extension IResourceBuilder<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)
{
// ...
}
}
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder.
name string The name of the resource. This name will be used as the connection string name when referenced in a dependency.
port int? optional The host port for Solr.
coreName string? optional The 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) extension IResourceBuilder<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)
{
// ...
}
}
builder IResourceBuilder<SolrResource> An ApplicationModel.IResourceBuilder`1 representing the Solr resource.
configSetName string The name of the config set.
configSetPath string Path 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) extension IResourceBuilder<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)
{
// ...
}
}
builder IResourceBuilder<SolrResource> The resource builder.
source string The source directory on the host to mount into the container.
isReadOnly bool optional A 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) extension IResourceBuilder<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)
{
// ...
}
}
builder IResourceBuilder<SolrResource> The resource builder.
name string? optional The name of the volume. Defaults to an auto-generated name based on the application and resource names.
isReadOnly bool optional A flag that indicates if this is a read-only volume.
IResourceBuilder<SolrResource> The ApplicationModel.IResourceBuilder`1.