Has this behavior changed in the most recent version? If so, how can I set the default keyword search behavior for multiple search terms to AND them together?

For example, if I enter "how to land a helicopter in autorotation"* (no quotes) in the keyword search box, it now returns results as if I had entered "how OR to OR land OR a OR helicopter OR in OR autorotation", whereas previously it returned results as if I had entered "how AND to AND land AND a AND helicopter AND in AND autorotation".

Thanks,

cubbtech

*This was an actual search query on our site. Mining your watchdog logs can provide some amusing fodder for null-set search queries :)

Comments

David Lesieur’s picture

No intentional change to the behavior has been made, but I noticed a bug that could lead to such results when running on PHP 4 and using a view to show results. Does that correspond to your setup?

john bickar’s picture

No, we're on PHP 5, and not using Views to display results.

Is there a way to set this default in the admin interface? I wasn't able to find it.

David Lesieur’s picture

Category: support » bug

Getting OR instead of AND is a bug. There is no admin setting for this, since AND is always implicit, unless searching for a phrase or unless 'OR' is explicitly typed in between the words.

john bickar’s picture

Thanks for the update. Some more information:

I get different search result sets for each of the following searches (no quotes):

  1. Faceted Search: "how to land a helicopter in autorotation" (8 results)
  2. Faceted Search: "how OR to OR land OR a OR helicopter OR in OR autorotation" (862 results)
  3. Core Search: "how to land a helicopter in autorotation" (0 results)
  4. Core Search: "how OR to OR land OR a OR helicopter OR in OR autorotation" (797 results)

So it doesn't look like it's exactly defaulting to the OR behavior, either.

Let me know if I can provide more information. (Site link, for reference.)

Thanks!

David Lesieur’s picture

Title: Keyword search defaults to OR? » Inaccurate results when using short words in the current search
Priority: Normal » Critical

Thanks for the additional info, this is very helpful!

I think I've found the issue. Faceted Search does not seem to handle the short words (less than 3 characters) properly. I'll look into this...

David Lesieur’s picture

Status: Active » Fixed

Just committed a change that (hopefully!) fixes this. Feel free to re-open the issue if you find other problems with short words.

David Lesieur’s picture

Version: 5.x-1.0-beta3 » 5.x-1.x-dev
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

john bickar’s picture

Status: Closed (fixed) » Active

Reopening as this issue still persists for me in both 5.x-1.x-dev and 5.x-1.0-beta4.

(Reference link.)

john bickar’s picture

Version: 5.x-1.x-dev » 5.x-1.0-beta4
Status: Active » Fixed

Appears to be fixed in 1.0-beta4. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.