Searching with OpenSearch or ElasticSearch
Search block with highly overridable components for searching, filtering and displaying search results. Sometimes also called faceted navigation.
As this search is addressing OpenSearch/ElasticSearch
with text analysis, the search does understand inflection of words, tolerates typos by fuzzy searching, allows exact search and wildcard search.
See User documentation on how to search.
Matched phrases are shown with highlighted matches.
Additional metadata per result item can be configured easily. Meta data values are clickable to find related content.
The block is prepared for Matomo analytics.
TODO backend instructions
TODO OpenSearch
Add volto-searchkit-block
to your package.json
:
"dependencies": {
"@rohberg/volto-searchkit-block": "^2.0.0"
}
Add @rohberg/volto-searchkit-block
to your add-ons in volto.config.js
:
const addons = ['@rohberg/volto-searchkit-block'];
TODO Configuration of the search block
TODO demo
Visit http://localhost:3000/ in a browser, login, and check the awesome new features.
The search is a fuzzy search, that means typos are compensated. Approximate matches and inflections are found.
To force the match of a search string, precede it with "+". To exclude matches of a search string, precede it with "-".
Use wildcards to find matches of words that complement the search string.
For exact matches of a search string embrace it with quotation marks.
A search for a word with hyphen is equivalent to a search for the word and the parts of it.
Example: A search for "LSR-Lehrbetrieb" is equivalent to a search for "LSR-Lehrbetrieb LSR Lehrbetrieb"
Words with hyphen are matched by searches for part of the words.
Example: "LSR-Lehrbetrieb" is found by a search for "LSR".
Search results include at least one of the search strings.
You can test search results on a test panel: /controlpanel/test-searchkit-querystrings
Please update the settings according to your deployment: /controlpanel/volto_searchkit_block_control_panel
The development of this add-on is done in isolation using a new approach using pnpm workspaces and latest mrs-developer
and other Volto core improvements.
For this reason, it only works with pnpm and Volto 18.
Run make help
to list the available commands.
help Show this help
dev-backend-start-monolingual Start backend dev server
dev-backend-start-multilingual Start backend dev server with two languages
install Installs the add-on in a development environment
start Starts Volto, allowing reloading of the add-on during development
start-monolingual Same as `make start` but with language 'de'
start-multilingual Same as `make start` but with language 'de' and multi lingual
build Build a production bundle for distribution of the project with the add-on
build-deps Build dependencies
i18n Sync i18n
ci-i18n Check if i18n is not synced
format Format codebase
lint Lint, or catch and remove problems, in code base
release Release the add-on on npmjs.org
release-dry-run Dry-run the release of the add-on on npmjs.org
test Run unit tests
ci-test Run unit tests in CI
acceptance-frontend-dev-start-monolingual Start acceptance frontend in development mode
acceptance-frontend-prod-start-monolingual Start acceptance frontend in production mode
acceptance-backend-start-monolingual Start backend acceptance server
ci-acceptance-backend-start-monolingual Start backend acceptance server in headless mode for CI
acceptance-test-monolingual Start Cypress in interactive mode
ci-acceptance-test-monolingual Run cypress tests in headless mode for CI
acceptance-frontend-dev-start-multilingual Start acceptance frontend in development mode
acceptance-frontend-prod-start-multilingual Start acceptance frontend in production mode
acceptance-backend-start-multilingual Start backend acceptance server
ci-acceptance-backend-start-multilingual Start backend acceptance server in headless mode for CI
acceptance-test-multilingual Start Cypress in interactive mode
ci-acceptance-test-multilingual Run cypress tests in headless mode for CI
It's recommended to start three individual terminal sessions, one each for running the Plone backend, the Volto frontend, and the index server. All sessions should start from the root directory.
Install backend.
make dev-backend-install
Install the frontend.
make install
Start the backend. Monolingual:
make dev-backend-start-monolingual
or start the multilingual backend:
make dev-backend-start-monolingual
Create a site.
make create-site-monolingual
or create a multilingual site:
make create-site-multilingual
Start the index server. Monolingual:
make dev-index-start-monolingual
or start the index server multilingual:
make dev-index-start-multilingual
In a separate terminal session, start the frontend.
make start-monolingual
or start multilingual:
make start-multilingual
Run ESlint, Prettier, and Stylelint in analyze mode.
make lint
Run ESlint, Prettier, and Stylelint in fix mode.
make format
Extract the i18n messages to locales.
make i18n
Run unit tests.
make test
Run each of these steps in separate terminal sessions.
In the first session, start the frontend in development mode.
make acceptance-frontend-dev-start-monolingual
In the second session, start the backend acceptance server.
make acceptance-backend-start-monolingual
In the third session, start the Cypress interactive test runner.
make acceptance-test-monolingual
Appropriate make commands for multilingual Cypress tests are available.
The project is licensed under the MIT license.
Crafted with care by Generated using Cookieplone (0.7.1) and cookiecutter-plone (6f17615) on 2024-10-26 13:17:25.419878. A special thanks to all contributors and supporters!