digitalutsc/ajax_solr_search

This package is abandoned and no longer maintained. No replacement package was suggested.

Drupal 8/9 module provide a user interface for the Federated Search functionality among all of Drupal sites which index content to one shared Solr core

Installs: 603

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 2

Language:JavaScript

Type:drupal-module

1.0.x-dev 2023-02-23 15:07 UTC

This package is auto-updated.

Last update: 2024-02-23 17:15:41 UTC


README

Introduction

Drupal 8/9 module provides a user interface for the Federated Search for multiple Drupal sites which index their content into a single shared Solr Core.

Based project:

  • Ajax Solr is the JavaScript library which provide web based user interface to Apache Solr. The module integrates the library into Drupal framework.

Federated Search

At Digital Scholarship Unit - UTSC Library, we have developed this module to support search and retrieval using a core that is shared by multiple individual Drupal sites. This allows us to have a federated search across Drupal sites where an end user can conduct a search and see relevant results from multiple sites. Federated Search

Requirements

  • A Solr endpoint
  • A shared Solr core which multisite sites indexing their contents into.
  • Ajax Solr library as dependency library.
  • At /admin/config/search/search-api/index/YOUR_SOLR_INDEX/fields in each of exhibit sites, setup with Search API fields with the same MACHINE NAME and TYPE. For example:
Field Machine Name Type In Solr
Thumbnail thumbnail String ss_thumbnail
Title title Fulltext tm_title
Description description Fulltext tm_description
URI (search_api_url) url String sm_url
Other optional fields to add... ... ... ...

Installation and configuration

  • By Composer: composer require digitalutsc/ajax_solr_search
  • OR git clone this module to your modules directory (ie. web/modules/contrib) of your Drupal site:
    • git clone https://github.com/digitalutsc/drupal_ajax_solr_search.git
  • Clone the dependency Ajax Solr library to Libraries directory (ie. drupal/web/libraries):
    • git clone https://github.com/digitalutsc/ajax-solr.git
  • Enable the module.
  • Visit /admin/config/search/ajax_solr, setting up with:
    • The URL for Search Results Page, default is /federated-search.
    • Select Solr field(s) to search against.
    • Select Solr field(s) for Facets.
    • Select Solr field for Year Range filter.
    • Select Solr field(s) for Sort Criteria.
      • When sorting ascending on a field, results without the field are displayed first. This can be configured by adding sortMissingLast=true to the field in the Solr schema. This property is false by default.
      • Note that sorting on Solr string fields is case-sensitive. Case-insensitive sorting can be done by modifying the Solr schema.
      • Sorting on multivalued fields is not supported.
    • Select 4 mandatory Solr fields for Search Result rows: Thumbnail, title, description, and URL. Other options field can also be added.

Config Screenshot!

Year Range and Sort Criteria Configuration

Additional Config Screenshot!

Usage

Please note:

This module won't work if its Drupal site and Solr Endpoint don't have the same Hypertext Transfer Protocol (HTTP). It means that both of Drupal site and Solr endpoint must be either in https:// or http://.

Maintainers