Epinova.Elasticsearch icon indicating copy to clipboard operation
Epinova.Elasticsearch copied to clipboard

Index and query non-public content

Open lonnkvist opened this issue 5 years ago • 0 comments

Currently non-public content is not indexed and cannot be queried easily. For example content that is not yet published, content with expired StopPublish etc.

The most obvious problem is search in Edit Mode (page-tree, assets-tree) where one would expect to get hits on unpublished content.

Secondly there are some requests from clients for this feature.

Scenarios to consider

1. Expired content / StopPublish filter

This can be solved by removing the check in Indexer.ShouldHideFromSearch()

2. Never published content

Will work when 4. is fixed.

3. Unpublished content with previous version

Index is version agnostic. Published version should be prioritized. Add logic in Save-event.

4. React on Save-event instead of Publish-event

Check published-status and existing index in regards to 3.
Maybe logic for transitions, to avoid update spam.

5. Querying

Add new argument bool ignoreFilters to GetContentResults(). This enables consumers to bypass filters. Defaults to false to preserve same behaviour as today.

Add new argument bool applyDefaultFilters to GetResults(). This enables consumers to control the inclusion of default filters (currently only StopPublish). Defaults to true to preserve same behaviour as today.

lonnkvist avatar May 14 '19 12:05 lonnkvist