Get started with the Solr integration
यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।
Apache Solr is a search platform built on Apache Lucene. The Aspire Community Toolkit hosting integration runs a Solr container, creates a core, and supplies the core’s HTTP URL to apps that reference it.
Why use Solr with Aspire
Section titled “Why use Solr with Aspire”- Start a local search service with a core configured by the AppHost.
- Use a custom configset to define the core’s schema and search behavior.
- Persist indexes and configuration with a volume or bind mount.
- Check the core’s ping endpoint before starting dependent apps.
How the pieces fit together
Section titled “How the pieces fit together”Install 📦 CommunityToolkit.Aspire.Hosting.Solr in the AppHost. Each resource runs a Solr container with one core selected at creation. A reference passes the core URL, host, port, and core name to the consuming app.
flowchart LR
AppHost[AppHost hosting integration] --> Solr[Solr container and core]
AppHost -->|Core URL| App[Consuming app]
App -->|HTTP queries and updates| Solr
Prerequisites
Section titled “Prerequisites”- Complete the Aspire prerequisites.
- Start a supported container runtime.
- Create an AppHost and a consuming app. The .NET walkthrough uses an ASP.NET Core project named
Api, referenced by the AppHost. - Prepare a valid Solr configset directory if the app needs a custom schema.
Set up the integration
Section titled “Set up the integration”-
Install the hosting package and add a resource named
solr. Select a core name, then reference the resource from the consuming app and wait for it. See Solr hosting integration for runnable AppHost examples. -
Read
ConnectionStrings:solrin .NET, orConnectionStrings__solrin other languages. The value already includes/solr/{coreName}. See Connect with the Solr integration for complete HTTP examples. -
Run
aspire run. Open the Solr HTTP endpoint from the dashboard to inspect the administration UI, then query the core from the consuming app.