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.
Install Plone backend add-on collective.elastic.plone 2.x
to provide the Plone REST API service which accepts queries and requests OpenSearch/ElasticSearch.
Install Plone backend add-on collective.elastic.ingest 2.x
to index Plone content.
Setting up OpenSearch/ElasticSearch instructions can be found on collective.elastic.plone 2.x
.
See the example configuration of collective.elastic of a mapping, attachment handling and last but not least analysis.
The block is not for editors. So please enable adding a searchkit block once by
config.blocks.blocksConfig.searchkitblock.restricted = true;
and disable the block after adding it to a page of your choice.
The block can be configured by
- searchable fields with boosting
- facets
- restricting types and states
- results meta data
Enable Matomo tracking via
config.settings.searchkitblock.trackVoltoMatomo = true
Components of @rohberg/volto-searchkit-block can be overridden via its overridableId:
const MySearchkitResultsListItem = ({ result, index }) => {
return (
<div>
<Header as="h3">
<Link to={flattenESUrlToPath(result['@id'])}>
{result.title}
</Link>
</Header>
</div>
);
};
config.settings.searchkitblock.overriddenComponents = {
'ResultsList.item.elasticsearch': MySearchkitResultsListItem,
};
/controlpanel/test-searchkit-querystrings
Please update the settings according to your deployment: /controlpanel/volto_searchkit_block_control_panel
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 do include at least one of the search strings.
This package is a Plone Volto integration of react-searchkit https://www.npmjs.com/package/react-searchkit Copyright (C) 2015-2019 CERN.
Copyright (C) 2024 Rohberg.
The project is licensed. See LICENSE for details.