# SolrResource

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

Represents an Apache Solr container resource.

## Definition

```typescript
interface SolrResource
  extends IComputeResource,
    IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithArgs,
    IResourceWithConnectionString,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IValueProvider,
    IValueWithReferences {
  readonly connectionStringExpression: ReferenceExpression;
  coreName: string;
  readonly host: EndpointReferenceExpression;
  readonly port: EndpointReferenceExpression;
  readonly primaryEndpoint: EndpointReference;
  readonly uriExpression: ReferenceExpression;
  withConfigset(
      configSetName: string,
      configSetPath: string): SolrResource;
  withDataBindMount(
      source: string,
      isReadOnly?: boolean): SolrResource;
  withDataVolume(
      name?: string,
      isReadOnly?: boolean): SolrResource;
}
```

## 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/typescript/communitytoolkit.aspire.hosting.solr/solrresource/withconfigset.md) -- `method` -- Specifies the path to the config set directory.
    ```typescript
  withConfigset(configSetName: string, configSetPath: string): SolrResource
  ```
- [withDataBindMount](/reference/api/typescript/communitytoolkit.aspire.hosting.solr/solrresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a Solr container resource.
    ```typescript
  withDataBindMount(source: string, isReadOnly?: boolean): SolrResource
  ```
- [withDataVolume](/reference/api/typescript/communitytoolkit.aspire.hosting.solr/solrresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a Solr container resource.
    ```typescript
  withDataVolume(name?: string, isReadOnly?: boolean): SolrResource
  ```
