Skip to content

Commit

Permalink
DOC Changelog CMS search with elemental
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jul 3, 2023
1 parent cd758f5 commit 0e98729
Showing 1 changed file with 20 additions and 0 deletions.
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 disables the default behaviour of rendering all content blocks for CMS search. Instead, it simply extracts the database contents of the elements. 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

0 comments on commit 0e98729

Please sign in to comment.