Select the Fields, click on Add and Configure. Go to Views, click on Add button next to the Fields section. Here we will be adding fields that we have indexed earlier to the View. Under Page Display settings, you can select the format in which you want to display your results – Table, Grid, HTML list or Unformatted list. Else, select a number of results to be displayed. Under Items to Display, select 0 if you want to display all the results in one page. Under View Settings dropdown list, select the index that you have created in Step 4.Ĭreate a page for your search results by clicking on the Create a page checkbox under the Page Settings tab. Navigate to Structure -> Views -> Add View. Now we will be creating a view for the data that needs to be indexed and displayed to your users. It will then show you a progress bar with the status of the number of items that have been indexed. In the Start Indexing Now section, click on the Index Now button. Under the same location, click on the View tab to start the process of indexing your content. Click on the Add fields button to create fields according to your requirement. Navigate to Configuration -> Search and metadata ->Search API -> data index and select the Fields tab. Next, we need to add Fields to be indexed. Select the “ Index items immediately” option to begin the indexing process. Next, select your server that you had already created (here - data server). Here you can choose to select all the bundles or only select a few from the below list to index. You can then move on to the next section - Configuring the Datasource (here – Content). Give a name to your index and then select Content as your Datasources since we will be indexing the Content entities here. Navigate to Configuration -> Search and metadata -> Search-API -> Index -> data_index. Next, configure the search index to improve the search performance. Give a name to your search server (here - data server). Navigate to Configuration -> Search and metadata -> Search-API from the admin interface to configure your search server. You can also use the default content types provided by Drupal. Search API module Step 2: Creating Content TypesĬreate the content you would like to include in the faceted search by adding Content types as shown below.So, a query with “Columbia” keyword is sent to the search server to retrieve the already configured and indexed categories (Communities, Hot Deals, etc.) Installing the Facets Module for Drupal 8Īs previously discussed, we will be implementing Faceted search using Drupal’s Search API module. You will also see the count of the results next to each facet. In one of our recent Drupal 8 projects, a quick search for Homes in Columbia on this website presents to you with facets like Communities, Hot Deals, Quick Move-ins and more. Let’s take a look at this below screenshot to understand Facets better. Facets will also display the number of matched results (usually within brackets) next to it. The facets provided are based on the search query the user has executed. Faceted search provides users with multiple filters at the same time for the various attributes of the content. If your users are finding it hard to see what they are searching for even after keying in their search query, they are bound to get frustrated. Facets also supports Drupal 9! Let’s look at configuring and implementing Faceted search with Drupal’s own search server, Search API. Previously Facet API in Drupal 7, the Facet module in Drupal 8 enables your website with faceted searching abilities. Once the user types in their search query, they will be presented with a list of relevant filter options to further narrow down their search. It is particularly useful for websites having large catalogues and listings. Faceted search offers users with a superior search experience by displaying filters against their search results.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |