Skip to content

Add vocabulary support for facet conditions (#63)#71

Merged
davisagli merged 3 commits intomainfrom
63-vocab-support
Mar 19, 2026
Merged

Add vocabulary support for facet conditions (#63)#71
davisagli merged 3 commits intomainfrom
63-vocab-support

Conversation

@reekitconcept
Copy link
Copy Markdown
Member

@reekitconcept reekitconcept commented Mar 18, 2026

  • Add useVocab/useVocabs hooks with VocabContext for caching and batched fetching
  • Extend fieldList config to support vocabulary references (name, isMultilingual)
  • Return vocabulary metadata from backend search endpoint
  • Wire vocabulary labels into SearchConditions and SearchConditionsField
  • Hide search prefix box for vocabulary-backed facet fields
  • Fix useSelector rerenders in SolrSearchAutosuggest and routes
  • Fix livesearch widget exception during text changes
  • Fix test_services_navigation.py which used the wrong layer and corrupted ZODB state
  • Add INSTRUCTIONS.md with documentation for vocabulary support and calculated fields
  • Add tests for VocabContext, useVocab, useVocabs, and backend vocabulary parsing

@reekitconcept reekitconcept changed the title Add vocabulary support and documentation for facet conditions Add vocabulary support for facet conditions (#63) Mar 18, 2026
@reekitconcept reekitconcept added the enhancement New feature or request label Mar 18, 2026
@reekitconcept reekitconcept force-pushed the 63-vocab-support branch 2 times, most recently from 19e4e7e to 7d363cc Compare March 18, 2026 19:52
@reekitconcept reekitconcept requested a review from davisagli March 18, 2026 20:40
- Add useVocab/useVocabs hooks with VocabContext for caching and batched
  fetching
- Extend fieldList config to support vocabulary references (name,
  isMultilingual)
- Return vocabulary metadata from backend search endpoint
- Wire vocabulary labels into SearchConditions and SearchConditionsField
- Hide search prefix box for vocabulary-backed facet fields
- Fix useSelector rerenders in SolrSearchAutosuggest and routes
- Fix livesearch widget exception during text changes
- Fix test_services_navigation.py which used the wrong layer and
  corrupted ZODB state
- Add INSTRUCTIONS.md with documentation for vocabulary support and
  calculated fields
- Add tests for VocabContext, useVocab, useVocabs, and backend
  vocabulary parsing
Copy link
Copy Markdown
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

Basically looks good, and I tested it successfully in kitconcept.intranet.

I'll leave a few comments but it's nothing to block merging.

Comment thread markdown-docs/README.md

## Why?

We want to keep the documentation simple and easy to read. We want to avoid the complexity of Sphinx documentation, the Makefile, and the build process.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You haven't gotten rid of those things though. So now we have:

  • some docs in the top-level README.md
  • some Sphinx docs in the docs folder
  • some docs here

It's an increase in complexity unless you move the existing docs here too, no?


```xml
<field name="location_reference" type="string" indexed="true" stored="true" />
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Users of the kitconcept/solr Docker image don't have access to schema.xml.

<field name="location_reference" type="string" indexed="true" stored="true" />
```

For facet fields, use `string` type to ensure exact value matching. Use `stored="true"` so the field is returned in search results, and `indexed="true"` so Solr can filter on it.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

stored=true is also necessary so that the value isn't lost when collective.solr does atomic reindexing operations.

Comment thread backend/src/kitconcept/solr/interfaces.py
@davisagli davisagli merged commit 99e95d3 into main Mar 19, 2026
20 checks passed
@davisagli davisagli deleted the 63-vocab-support branch March 19, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants