[Koha] Title search works, but Library catalog search fails in OPAC

Bales (US), Tasha R tasha.r.bales at boeing.com
Tue Jun 22 10:46:22 NZST 2021

Good afternoon,

I’m having trouble with Title vs. Library catalog keyword searching with several example titles.  Searching the same phrase with either method yields different results.  This problem occurs only in the OPAC.  I hope to confirm whether the behavior I’m seeing is intended (i.e., the problem is me) or not.  Thanks in advance.

For example, given the ebook title, Electroactive polymer (EAP) actuators as artificial muscles,
a Title keyword search in the OPAC is successful, but a plain, Library catalog (i.e., no index specified), keyword search fails.

For reference, the title is recorded in the MARC record as:
  a Title Electroactive polymer (EAP) actuators as artificial muscles :

Below I’ve copied in my search history as well as the tail of the search URL that shows the search parameters.

·         Library catalog keyword search with 0 results

o   2021-06-21 02:34 PM   Electroactive polymer (EAP) actuators, suppress:false  0

o   …opac-search.pl?idx=&q=Electroactive%20polymer%20%28EAP%29%20actuators&weight_search=1

·         Title keyword search with 2 results

o   2021-06-21 02:34 PM   Electroactive polymer (EAP) actuators, suppress:false  2

o   …opac-search.pl?idx=ti&q=Electroactive+polymer+%28EAP%29+actuators&weight_search=1

As a test, I decided to enclose my Library catalog search terms in quotes, which yielded the desired results.  However, I did not at all anticipate that quotes would be required to get hits:

·         Library catalog quoted keyword search with 2 results

o   2021-06-21 02:46 PM   "Electroactive polymer (EAP) actuators", suppress:false  2

o   … opac-search.pl?idx=&q=%22Electroactive+polymer+%28EAP%29+actuators%22&weight_search=1

On comparing the above URL query strings, it appears that the unquoted terms in the Library catalog keyword search aren’t “anded” together with a “+” the way other searches are, but I’m not sure what the implications are, if any.  Also, the Koha manual indicates the following, which suggests to me that I ought to get hits on the unquoted string:

When you have more than one word in the search box, Koha will still do a keyword search, but a bit differently. Each word will be searched on its own, then the Boolean connector ‘and’ will narrow your search to those items with all words contained in matching records.

I understand and can predict pretty well the way our old ILS (Millennium, if context helps) will perform a keyword search, but I’m a little confused here.  My expectation for this particular case is that all of the above methods would yield results.  If there are any pointers to be had, I thank you if might point me to them so that I may be better poised to help users.

I’m using Elasticsearch with Koha 20.11.06.  I reindexed both authorities and biblios today, but that didn’t impact my experience.  The records are not newly added.


Tasha Bales
Business Support Team | Information Services
Enterprise Services | Enterprise Operations, Finance and Sustainability

More information about the Koha mailing list