# SolrResource

- Module: [CommunityToolkit.Aspire.Hosting.Solr](/reference/api/go/communitytoolkit.aspire.hosting.solr.md)
- Version: `13.6.1`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Represents an Apache Solr container resource.

## Definition

```go
type SolrResource interface {
    ExpressionValue
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithConnectionString
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- `ExpressionValue`
- `IComputeResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithConnectionString`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- `ResourceWithWaitSupport`

## Properties

- `ConnectionStringExpression`: `*ReferenceExpression` `get` -- Gets the connection string expression for the Solr server.
- `CoreName`: `string` `get/set` -- The Solr core name.
- `Host`: `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for this resource.
- `Port`: `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for this resource.
- `PrimaryEndpoint`: `EndpointReference` `get` -- Gets the primary endpoint for the Solr server.
- `UriExpression`: `*ReferenceExpression` `get` -- Gets the connection URI expression for the Solr server.

## Methods

- [WithConfigset](/reference/api/go/communitytoolkit.aspire.hosting.solr/solrresource/withconfigset.md) -- `method` -- Specifies the path to the config set directory.
  ```go
  WithConfigset(configSetName string, configSetPath string) SolrResource
  ```
- [WithDataBindMount](/reference/api/go/communitytoolkit.aspire.hosting.solr/solrresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a Solr container resource.
  ```go
  WithDataBindMount(source string, options ...*WithDataBindMountOptions) SolrResource
  ```
- [WithDataVolume](/reference/api/go/communitytoolkit.aspire.hosting.solr/solrresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a Solr container resource.
  ```go
  WithDataVolume(options ...*WithDataVolumeOptions) SolrResource
  ```
