Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Changelog CMS search with elemental #291

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions en/04_Changelogs/5.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ title: 5.1.0 (unreleased)
- [Features and enhancements](#features-and-enhancements)
- [Eager loading](#eager-loading)
- [GraphQL schema can be stored in `silverstripe-cache`](#gql-schema-is-cache)
- [Improvement to page search performance with Elemental](#cms-search-performance)
- [Other new features](#other-features)
- [API changes](#api-changes)
- [Dependency changes](#dependency-changes)
Expand Down Expand Up @@ -48,6 +49,25 @@ Note that even if you store the schema in the cache directory, the schema still

See [choosing where the cache is stored](/developer_guides/graphql/getting_started/building_the_schema/#cache-location) for more information about configuring the schema storage directory.

### Improvement to page search performance with Elemental {#cms-search-performance}

- The CMS search has been optimised to reduce the number of database queries made when searching for pages with elemental content blocks. This has resulted in a small performance improvement. In our test environment, with 1,000 pages each with 5 content blocks we observed a 9% performance improvement. Performance will vary with your environment.
- A new opt-in behaviour is available that makes a very large difference to performance when using elemental content blocks. In testing, this behaviour more than halved the response time of the sitetree search request. The opt-in feature disables the default behaviour of rendering all content blocks for CMS search. Instead, it simply extracts the database contents of the elements from its text and html fields. There is a downside to consider which is that any related content not directly on the element will not be matched against the search query. Note this does not use the `$searchable_fields` config. To opt-in to this behaviour, use the following config:

```yml
DNADesign\Elemental\Controllers\ElementSiteTreeFilterSearch:
render_elements: false
```

If `render_elements` is set to `false` then individual fields on elements can be excluded from search by adding them to a config array:

```yml
App\MyElement:
fields_excluded_from_cms_search:
- MyFieldToExclude
- AnotherFieldToExclude
```

### Other new features

- You can now exclude specific `DataObject` models from the check and repair step of `dev/build` - see [ORM Performance](/developer_guides/performance/orm/#skip-check-and-repair) for more information.
Expand Down