Refactor view to use search index
Work required:
-
Ensure you have drutopia_dev
andentity_clone
installed and enabled. -
Clone the node_dev
index to create a search index for each content type limiting it to that one content type. Give it the same name as the content type and update the description. -
Configure the search_index
view mode for your content type and use it in the rendered HTML field on the search index. -
Add any fields that are specific to the content type, for example a type
vocabulary. This will be needed for any field that we want to use for facets. -
Flush caches before proceeding. -
Clone the existing view so that it can be used as an example giving it a new name (e.g., article_deprecated) and delete the existing view so you can use the same name and path. -
Create a new view based on the search index for your content type. -
Use the rendered entity (card), sort by people type and post date descending. -
Force using fields and group by people type. -
Set caching to none. -
Under format settings, ensure that Add views row classes is unchecked. -
When complete delete your example view. -
Regenerate your feature ensuring that the search index is included (this will likely automatically show up in search due to the namespace packager so you will need to manually add).
Edited by Rosemary Mann