Skip to main content

What am I setting out to achieve?

I want to meet the following requirements:

  • Boolean operators in the search.  Tested against the following terms
    • abalone NOT salmon – 1159
    • abalone -salmon – 1159
    • abalone AND salmon – 478
    • abalone +salmon – 1195
    • abalone OR salmon – 2316
    • abalone || salmon – 2316
  • Phrases in quotations marks - this time to be tested against
    • "of this stimulates an interest in the sea and a love for the marine environment" – 1
    • of this stimulates an interest in the sea and a love for the marine environment - 5686

Note:

  • The numbers after the dash are the results returned from the query;
  • In phrases - the difference between first and second is the first look for the text in quotation marks in its entirety.  Whereas, the second, looks for any of the words in the string.

 

Set up

OK, this is over the top information, but I wanted to provide more details about the current structure.

Solr Version 8.11.1
Drupal search_api drupal-4.2.4-solr-8.x-0

 

Server:

Most of the settings noted below are stock standard with your install.

Solr Connector Standard
Solr Host localhost
Query timeout 5
Index timeout 5
Optimize timeout 10
Finalize timeout 30

 

Advanced

OK, this is over the top information, but I wanted to provide more details about the current structure.

Default result rows 10
Index single document fallback count 10

 

Index:

Cron batch size 250

 

 

View set-up

Filter criteria - Search: Fulltext search (and)

Expose this filter Yes
Single filter Yes
Label Search
Operator Contains all of these words
Parse mode Direct query
Filter identifier search
Searched fields Select what is required.  I left blank to select all

 

Related articles

Andrew Fletcher06 Jan 2023
How to set Apache Solr admin password
Setting up the admin password.   Process: 1. Edit jetty.xml To begin you are going to edit the file “server/etc/jetty.xml”.  However, if you aren't sure of the location of jetty.xml, run the command find / -name jetty.xml -type f For me, the output...
Andrew Fletcher17 Aug 2022
How To Install Apache Solr 8.11 on Ubuntu
In this article I'll walk through the steps I went through to install Solr on Ubuntu.   Step 1: Java Check if Java is installed on your server: java -version Not there - then Java is the first step for you to set up for Solr.  JAVA SE 8 or Later is required to run...
Andrew Fletcher17 Aug 2022
How To Install Apache Solr 8.11 on CentOS/RHEL 7
Looking to install Solr on your server?  Not sure if it worth the effort?  Well, Apache Solr is the open-source, popular, super fast open source enterprise search platform from the Apache Lucene project.  Written in Java, Solr is highly scalable, providing fault-tolerant distributed...