- You need a Solr Server with a WissKI core up and running.
- The Solr Search Api module is installed and configured.
Add a view mode
Navigate to Manage Structure Display modes View modes and click + Add view mode. Choose Wisski Entity and enter a name for your fulltext-search-view-mode .
Configure view mode for your WissKI entity
Go to Manage Structure WissKI Entities and Bundles. Choose your wisski-entity , unfold the operations menu by clicking on the caret and select Manage display. Unfold Custom display settings at the buttom and check fulltext-search-view-mode . Click Save.
Your fulltext-search-view-mode will immediately appear as a tab on the top. Click on it. We will configure this view mode as a preview for the search results. Drag and drop the fields you want to display to the Field section, if you want to hide fields, drag and drop them to the Disabled section. You may want to change formatters, i. e. the image style to Wisski Preview Image Style. Click Save, when you are finished.
Add fields to be indexed
Navigate to Manage Configuration Search API (Search and Metadata section), in the row of your solr-index , unfold the Operations menu by clicking on the caret and select Fields. Click + Add fields. Click Add just to the right of Rendered HTML output. Leave the User roles to Anonymous user, but as View mode for Wisski Entity, select your fulltext-search-view-mode . Click Save.
Back at the Add fields to index pop up, click again Add just to the right of Rendered HTML output, but now select Default as View mode for Wisski Entity and click Save. Click Done at the Add fields to index pop up.
Alter the name of your default-rendered-html-output and fulltext-rendered-html-output to something useful. Change the Type of both to Fulltext "ngram" and click Save changes.
Go to the View tab an click Index now.
Create view for fulltext search
Go to Manage Structure Views and click + Add view. Choose a name for your view-for-fulltext-search , under View settings select your solr-index next to Show:, check Create a page in section Page settings. You may want to alter the Page title and Path of the page. At Page display settings, change the Display format to Grid. Click Save and edit.
Configure view for fulltext search
On the configuration page of the view delete unnecessary fields by selecting Search: default-rendered-html-output (indexed field) in the Fields section and click Remove on the Configure field pop up.
Now add desired fields by clicking Add to the right of the Fields section. Check fulltext-rendered-html-output and click Add and configure fields. On the Configure field pop up, check Use highlighted field data and click Apply.
Add the fulltext search field by clicking Add at the right of the Filter criteria section. Check Fulltext search (not default-rendered-html-output or fulltext-rendered-html-output ) and click Add and configure filter criteria.
On the configuration filter criterion pop up, check this triggers an initial search and ensures that the full text view mode is displayed immediately). As Searched fields, choose your default-rendered-html-output . Hit Apply.
Now tweak your search performance: unfold the Advanced section with a click and click Settings next to Query settings. Check Skip item access checks and Bypass access checks and click Apply.
Disable Caching by clicking on Tag based, choose None on the Page: Caching pop up and hit Apply (this display).
Back at the configuration page of the view click Save.
At Manage Configuration Search API (Search and metadata section) click on your solr-index and reindex your WissKI entities with Index now.
In default state, you should see all your entities only with the fields you defined in your fulltext-search-view-mode . You can enter a search term at the fulltext search field in the Preview section and hit Apply. You should see only the entities according to your search with fields defined at fulltext-search-view-mode .