Skip to main content

2 reasons for Apache Solr Indexes

... with Drupal Search API

1.) Affiliated site sections return trimmed results, based on content taxonomy terms.
2.) Date time range search for calendar tools, like reservation conflict validation.

See this Git project for further references on Pantheon specifics.


Search result content bleed example 1:

Image

Search result content bleed example 2:

Image

 

https://www.drupal.org/project/search_api_solr

Tip: Create search indexes based on a content tagging taxonomy.

Usage Stats & 15 Years!

Image
Image


Search Index by Site Section / Community 
:8983/solr/#/
ls -l /var/solr/data/new_core/conf/

sudo mkdir -p /var/solr/data/security
sudo nano /var/solr/data/security/security.json

security.json

{
 "authentication":{
   "class":"solr.BasicAuthPlugin",
   "credentials":{
     "admin":"setmeupthe"
   },
   "blockUnknown": true
 },
 "authorization":{
   "class":"solr.RuleBasedAuthorizationPlugin",
   "permissions":[
     {
       "name":"all",
       "role":"admin"
     }
   ],
   "user-role":{
     "admin":"admin"
   }
 }
}
 

// Checking the solr home path
sudo cat /etc/default/solr.in.sh | grep SOLR_HOME

// Password helper
https://github.com/clemente-biondo/clemente-biondo.github.io

Drupal's Search API Solr module requires a specific Solr configuration that matches its indexing needs. The correct schema is provided within the module.

Find the Solr config files for your version of Solr in the search_api_solr module directory:

SEE:

https://www.jeffgeerling.com/ set hierarchical taxonomy term- facet using facet api-search api-solr

drupal.org: Docs extending drupal contributed-module: contributed-module-documentation - search-api-solr

Pantheon Solr Documentation Page

SOLR_AUTH_TYPE="basic" SOLR_AUTHENTICATION_OPTS="-Dbasicauth=USERNAME:PASSWORD"

/opt/solr-9.8.0/bin/solr create -c library_core
Neither --zk-host or --solr-url parameters provided so assuming solr url is http://localhost:8983.
WARNING: Using _default configset. Data driven schema functionality is enabled by default, which is
        NOT RECOMMENDED for production use.

        To turn it off:
           curl http://localhost:8983/solr/library_core/config -d '{"set-user-property": {"update.autoCreateFields":"false"}}'
        Or:
           bin/solr config -c library_core -s http://localhost:8983 --action set-user-property --property update.autoCreateFields --value false

Created new core 'library_core'

 


 

Affiliated Site