Skip to content

Feature/add configset to solr integration#1162

Open
Chicoo wants to merge 6 commits intoCommunityToolkit:mainfrom
Chicoo:feature/add-configset-to-solr-integration
Open

Feature/add configset to solr integration#1162
Chicoo wants to merge 6 commits intoCommunityToolkit:mainfrom
Chicoo:feature/add-configset-to-solr-integration

Conversation

@Chicoo
Copy link
Contributor

@Chicoo Chicoo commented Mar 13, 2026

**Closes #1161 **

Adds methods to use custom Solr configsets and to persist the data with either adding a volume or mount.

PR Checklist

  • [x ] Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • [ x] Based off latest main branch of toolkit
  • [ x] PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • [x ] Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • [ ]x Tests for the changes have been added (for bug fixes / features) (if applicable)
  • [ x] Contains NO breaking changes
  • [ x] Every new API (including internal ones) has full XML docs
  • [ x] Code follows all style conventions

Other information

Marco De Brouwer and others added 4 commits March 13, 2026 17:01
- Method to add custom configsets to Solr .
- Methods to persist data to  a volume or a dind mount

Added tests for the new methods.
Added custom config set for test.
Copilot AI review requested due to automatic review settings March 13, 2026 22:18
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1162

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1162"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new capabilities to the CommunityToolkit.Aspire.Hosting.Solr integration to (1) mount and use a custom Solr configset when creating the core, and (2) persist Solr data via a named volume or bind mount. The PR also expands tests and documentation/examples to cover the new APIs.

Changes:

  • Add WithConfigset support via a new SolrConfigSetAnnotation and updated container args/core creation behavior.
  • Add persistence helpers: WithDataVolume and WithDataBindMount mounting /var/solr.
  • Add tests plus a bundled test configset under tests/.../configsets/, and update README/examples.

Reviewed changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
.vscode/settings.json Adds VS Code settings, including terminal auto-approve configuration.
examples/solr/Program.cs Demonstrates using WithConfigset in the Solr example app.
src/CommunityToolkit.Aspire.Hosting.Solr/CommunityToolkit.Aspire.Hosting.Solr.csproj Switches to AdditionalPackageTags to feed repo-wide NuGet PackageTags.
src/CommunityToolkit.Aspire.Hosting.Solr/README.md Documents custom configsets and data persistence options.
src/CommunityToolkit.Aspire.Hosting.Solr/SolrBuilderExtensions.cs Implements configset handling and adds data volume/bind mount helpers.
src/CommunityToolkit.Aspire.Hosting.Solr/SolrConfigSetAnnotation.cs Introduces a new annotation type to carry configset name/path.
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/SolrResourceTests.cs Adds unit tests for configset annotation and data persistence APIs.
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/protwords.txt Test configset asset (protected words list).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/solrconfig.xml Test configset asset (Solr core configuration).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/stopwords.txt Test configset asset (stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/synonyms.txt Test configset asset (synonyms).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/contractions_ca.txt Test configset language asset (Catalan contractions).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/contractions_fr.txt Test configset language asset (French contractions).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/contractions_ga.txt Test configset language asset (Irish contractions).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/contractions_it.txt Test configset language asset (Italian contractions).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/hyphenations_ga.txt Test configset language asset (Irish hyphenations).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stemdict_nl.txt Test configset language asset (Dutch stemming overrides).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_ar.txt Test configset language asset (Arabic stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_bg.txt Test configset language asset (Bulgarian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_ca.txt Test configset language asset (Catalan stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_cz.txt Test configset language asset (Czech stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_da.txt Test configset language asset (Danish stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_de.txt Test configset language asset (German stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_el.txt Test configset language asset (Greek stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_en.txt Test configset language asset (English stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_es.txt Test configset language asset (Spanish stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_et.txt Test configset language asset (Estonian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_eu.txt Test configset language asset (Basque stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_fa.txt Test configset language asset (Persian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_fi.txt Test configset language asset (Finnish stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_fr.txt Test configset language asset (French stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_ga.txt Test configset language asset (Irish stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_gl.txt Test configset language asset (Galician stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_hi.txt Test configset language asset (Hindi stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_hu.txt Test configset language asset (Hungarian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_hy.txt Test configset language asset (Armenian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_id.txt Test configset language asset (Indonesian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_it.txt Test configset language asset (Italian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_ja.txt Test configset language asset (Japanese stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_lv.txt Test configset language asset (Latvian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_nl.txt Test configset language asset (Dutch stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_no.txt Test configset language asset (Norwegian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_pt.txt Test configset language asset (Portuguese stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_ro.txt Test configset language asset (Romanian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_ru.txt Test configset language asset (Russian stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_sv.txt Test configset language asset (Swedish stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_th.txt Test configset language asset (Thai stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stopwords_tr.txt Test configset language asset (Turkish stopwords).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/stoptags_ja.txt Test configset language asset (Japanese stoptags).
tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/configsets/test/conf/lang/userdict_ja.txt Test configset language asset (Japanese user dictionary).

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Chicoo Chicoo marked this pull request as draft March 13, 2026 22:37
@Chicoo Chicoo marked this pull request as ready for review March 14, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants