From d067054f7233e5bf10779467ec963996075d8813 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 10 Mar 2023 12:21:31 +1300 Subject: [PATCH 1/6] MNT Update development dependencies --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f30a70d..a1f0d25 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "silverstripe/framework": "^4.10", + "silverstripe/framework": "4.13.x-dev", "monolog/monolog": "~1.15", "silverstripe/solr-php-client": "^1.0", "symfony/process": "^3.4 || ^4", @@ -55,4 +55,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} +} \ No newline at end of file From 5610c56365e01f9e78145016644e6432527a1c7b Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 10 Mar 2023 16:36:07 +1300 Subject: [PATCH 2/6] MNT Update release dependencies --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a1f0d25..12a9d30 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "silverstripe/framework": "4.13.x-dev", + "silverstripe/framework": "4.13.0-beta1", "monolog/monolog": "~1.15", "silverstripe/solr-php-client": "^1.0", "symfony/process": "^3.4 || ^4", From 99af1a0d21ad2ecd8f6ab0ecbf335f83d5da5d61 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 10 Mar 2023 16:36:11 +1300 Subject: [PATCH 3/6] MNT Update development dependencies --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 12a9d30..a1f0d25 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "silverstripe/framework": "4.13.0-beta1", + "silverstripe/framework": "4.13.x-dev", "monolog/monolog": "~1.15", "silverstripe/solr-php-client": "^1.0", "symfony/process": "^3.4 || ^4", From 6b9aa835975227a7fab160f5a5da6541e4740612 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 28 Mar 2023 10:25:00 +1300 Subject: [PATCH 4/6] FIX Don't use deprecated API --- _config.php | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 _config.php diff --git a/_config.php b/_config.php deleted file mode 100644 index 31684ea..0000000 --- a/_config.php +++ /dev/null @@ -1,5 +0,0 @@ - Date: Tue, 28 Mar 2023 17:17:51 +1300 Subject: [PATCH 5/6] MNT Revert erroneous dependency changes (#346) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a1f0d25..033da31 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "silverstripe/framework": "4.13.x-dev", + "silverstripe/framework": "^4.10", "monolog/monolog": "~1.15", "silverstripe/solr-php-client": "^1.0", "symfony/process": "^3.4 || ^4", From 6245ec97f84af28e6524604a94106d42775a2733 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Wed, 19 Apr 2023 16:18:25 +1200 Subject: [PATCH 6/6] DOC Update README.md for CMS 5 --- README.md | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index dfed306..56b89f8 100644 --- a/README.md +++ b/README.md @@ -4,32 +4,18 @@ [![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/) Adds support for fulltext search engines like Sphinx and Solr to Silverstripe CMS. -Compatible with PHP 7.2 -## Important notes when upgrading to fulltextsearch 3.7.0+ - -There are some significant changes from previous versions: - -Draft content will no longer be automatically added to the search index. This new behaviour was previously an -opt-in behaviour that was enabled by adding the following line to a search index: +## Installation +```sh +composer require silverstripe/fulltextsearch ``` -$this->excludeVariantState([SearchVariantVersioned::class => Versioned::DRAFT]); -``` - -A new `canView()` check against an anonymous user (i.e. someone not logged in) and a `ShowInSearch` check is now -performed by default against all records (DataObjects) before being added to the search index, and also before being -shown in search results. This may mean that some records that were previously being indexed and shown in search results -will no longer appear due to these additional checks. - -These additional checks have been added with data security in mind, and it's assumed that records failing these -checks probably should not be indexed in the first place. # Enable indexing of draft content: You can index draft content with the following yml configuration: -``` +```yaml SilverStripe\FullTextSearch\Search\Services\SearchableService: variant_state_draft_excluded: false ``` @@ -49,7 +35,7 @@ also disable the check for descendants of the specified DataObjects. Ensure that is correctly performing a `canView()` check at query time before disabling the pre-index check, as this may result in leakage of private data. -``` +```yaml SilverStripe\FullTextSearch\Search\Services\SearchableService: indexing_canview_exclude_classes: - Some\Org\MyDataObject @@ -58,7 +44,7 @@ SilverStripe\FullTextSearch\Search\Services\SearchableService: ``` You can also use the `updateIsSearchable` extension point on `SearchableService` to modify the result of the method -after the `ShowInSearch` and `canView()` checks have run. +after the `ShowInSearch` and `canView()` checks have run. It is highly recommend you run a [solr_reindex](https://github.com/silverstripe/silverstripe-fulltextsearch/blob/3/docs/en/03_configuration.md#solr-reindex) on your production site after upgrading from 3.6 or earlier to purge any old data that should no longer be in the search index. @@ -82,12 +68,6 @@ cached in memory so there is virtually no performance penalty calling it a secon - If your implementation is very custom and does not subclass nor make use of either `SolrIndex` or `SearchForm`, then it's recommended you update your implementation to call `SearchableService::isViewable()`. -## Requirements - -* Silverstripe 4.0+ - -**Note:** For Silverstripe 3.x, please use the [2.x release line](https://github.com/silverstripe/silverstripe-fulltextsearch/tree/2). - ## Documentation For pure Solr docs, check out [the Solr 4.10.4 guide](https://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-4.10.pdf).