Skip to content

Conversation

@reekitconcept
Copy link
Member

@reekitconcept reekitconcept commented Jan 24, 2026

NOTE: This changeset extends the backend API to support advanced search features (spellcheck, collate, highlighting), and extends the frontend API to allow projects to implement custom UX on top of kitconcept.solr's capabilities.

It also fixes a critical bug where filtering by multiple facet conditions failed to correctly disable voided conditions.

When using the built-in default search page, both search and suggest work identically as before.

Summary

  • Add spellcheck with collate support for "did you mean" suggestions
  • Add highlighting with alternate field support
  • Add extra conditions filtering (content types, metadata fields)
  • Fix facet conditions, portal type, and content fields handling
  • Fix language handling and encoding issues
  • Fix local search path prefix matching
  • Update Solr configuration for spellcheck component
  • Add upgrade step for highlighting field setup

Frontend

  • Add getCollationMisspellings helper for "did you mean" feature
  • Add getSuggestions helper for extracting/sorting suggestions
  • Add navigation_with_excluded Redux action and reducer
  • Add SearchWidget customization to use SolrSearchWidget

Tests

  • Add comprehensive spellcheck/collate tests
  • Add highlighting endpoint tests
  • Add extra conditions tests
  • Add utility function tests

Test plan

  • Backend tests pass
  • Frontend tests pass
  • Cypress tests pass
  • Tested with FHNW project - global search works with suggestions

@reekitconcept reekitconcept changed the title Add FHNW Solr features: spellcheck, collate, highlighting, and frontend helpers WIP Add FHNW Solr features: spellcheck, collate, highlighting, and frontend helpers Jan 24, 2026
@reekitconcept reekitconcept force-pushed the fhnw-features branch 2 times, most recently from 2a95384 to 5273b71 Compare January 24, 2026 17:08
…nd helpers

NOTE: This changeset extends the backend API to support advanced search
features (spellcheck, collate, highlighting), and extends the frontend
API to allow projects to implement custom UX on top of kitconcept.solr's
capabilities.

It also fixes a critical bug where filtering by multiple facet
conditions failed to correctly disable voided conditions.

When using the built-in default search page, both search and suggest
work identically as before.

Backend:
- Add spellcheck with collate support for "did you mean" suggestions
- Add highlighting with alternate field support
- Add extra conditions filtering (content types, metadata fields)
- Fix facet conditions, portal type, and content fields handling
- Fix language handling and encoding issues
- Fix local search path prefix matching
- Update Solr configuration for spellcheck component
- Add upgrade step for highlighting field setup

Frontend:
- Add getCollationMisspellings helper for "did you mean" feature
- Add getSuggestions helper for extracting/sorting suggestions
- Add navigation_with_excluded Redux action and reducer
- Add SearchWidget customization to use SolrSearchWidget
- Updated resultItems/index.js to avoid inline re-export pattern

Tests:
- Add comprehensive spellcheck/collate tests
- Add highlighting endpoint tests
- Add extra conditions tests
- Add utility function tests
The plone.autoinclude loader derives module names from project names
using: `wsdist.project_name.replace("-", "_")`

For kitconcept.solr this produces the wrong import path:
- Project name: kitconcept.solr → PEP 503 normalized: kitconcept-solr
- After replace("-", "_"): kitconcept_solr
- Actual import path: kitconcept.solr (namespace package with dot)

The fix-25 branch (plone/plone.autoinclude#25) addressed this for
z3c.autoinclude.plugin entry points but not for plone.autoinclude.plugin.

Workaround: explicitly set module = "kitconcept.solr" so the loader
uses the specified value instead of deriving it incorrectly.

Refs: plone/plone.autoinclude#25
Refs: plone/Products.CMFPlone#4126
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.

2 participants