What’s Aspect Search?
Aspect search is a technique to filter content material dynamically. It comes with a number of filters on the similar time for the varied attributes of the content material. Aspects can even show the variety of matched outcomes subsequent to them. It really works with the Drupal core and search API. Aspect 3.0.x works with drupal 9 or 10.
Module Requirement
Step 1
Create a content material sort that you want to, or you should utilize an current one.
Navigate to Construction >> Content material sort >> Add content material sort
Step 2
Configure the Search Server
Navigate to Configuration >> Search and Metadata >> Search API >> Add server.
Server title, Solr host, and Solr core are all essential fields that you must add.
Lastly, reserve it.
Step 3
Subsequent, configure the search index.
Navigate to Configuration >> Search and Metadata >> Search API >> Add index.
Configure the content material datasource. Choose bundles you may select all additionally.
Choose server and at last, reserve it.
Step 4
Add Fields for Indexing
Navigate to Configuration >> Search and metadata >>Search API >> Add index and choose the Fields tab. Add fields as wanted and save your adjustments.
Click on on view to index the content material throughout the similar. To start indexing, click on the “index now” button.
Step 5
Create a views in Drupal 9
Navigate to Construction >> Views >> Add View.
Add the view’s title or an outline. Within the view setting, select Created Index in Step 3.
Make a web page along with your solutions for the web page title and path. Arrange all settings and click on on “Save and Edit.”
Insert Fields into the view. Contained in the render setting and choose the Hyperlink to Content material checkbox.
Ref. https://www.drupal.org/docs/8/core/modules/views
Step 6
Configure the sides.
Go to Configuration >> Search and meta information >> Aspects
Click on on the “add aspect” button. Choose Aspect supply – That is your views.
Choose fields – That is what you had created for indexing in step 4.
Title it and reserve it.
Subsequent, you will notice extra configuration choices. Change the settings to fulfill your wants.
Lastly, reserve it.
Step 7
Subsequent, place the sides in block format in a web page area of your selection.
Go to Construction >> Block Format.
Place the block and reserve it.
End result
Hurray! Your aspect search web page and performance at the moment are prepared. As you may see, some classes, equivalent to A, B, and so forth, are sides search. We used the checkbox widget in Step 6.
Conclusion
Our sides search has been efficiently applied. We discovered about faceted search, the search API module, content material sort, views, and sides performance. Comfortable Studying!!!