I tested some of the advanced search features, and none of them seem to work. For example, searching for a phrase by wrapping it in quotes doesn't match the phrase. And adding a "-" before a word doesn't cause content with that word to be filtered out.

CommentFileSizeAuthor
#1 xapian.module.patch1.32 KBjeremy

Comments

jeremy’s picture

Status: Active » Needs review
StatusFileSize
new1.32 KB

This turned out to be a simple fix -- the Xapian module was doing too much pre-processing, instead of leaving things to Xapian.

This patch removes the checks for "Special" words, and lets Xapian sort things out. AND and OR are treated correctly, as well as quoting phrases and filtering out words using "-". This also removes a PHP5-only call to stripos().

For consistency, I also changed "$database" to "$db" like we have everywhere else in the code.

singularo’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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