Skip to content

Add possibility to add configset to Solr core and persist the data #1161

@Chicoo

Description

@Chicoo

Related to an existing integration?

Yes

Existing integration

CommunityToolkit.Aspire.Hosting.Solr

Overview

A ConfigSet in Solr is a collection of configuration files (like solrconfig.xml and schema.xml) that define how a Solr core behaves, including request handling, indexing, and query processing. Using a custom ConfigSet allows us to tailor the core’s behavior to our application needs.

Currently, the integration is always using the default configset. The integration needs to be able add a new ConfigSet to the Solr core.
For this a new method needs to be added that takes the name of the configset and the link to the location of the configset. The integration then needs to create a mount to the confegset and configure the core to use this.

Furthermore the data is not persisted across restarts. The integration needs to be able to persist the data. For this the WithDataVolume and WithDataBindMount need to be added to the integration

Usage example

For adding a new config set

var solr = builder.AddSolr("solr", coreName: "mycore")
     .WithConfigset("my-config", "/path/to/configsets/my-config");

Adding a volume:

var solrNamed = builder.AddSolr("solr")
    .WithDataVolume("my-solr-data");

Adding a mount:

var solrNamed = builder.AddSolr("solr")
    .WithDataBindMount("/path/to/solr/data");

Breaking change?

No

Alternatives

It is not possible to do this with the current integration.

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions