alphagov/rummager — pull request #43 by fatbusinessman (2012-10-17 15:15:13+00:00)
Title: Escape conjunctions before passing them to search.

elasticsearch takes capitalised 'AND' and 'OR' and interprets them as Boolean query operators: if there isn't a word on either side, it will b0rk with an error.

Escaping queries still isn't an ideal fix -- preferably, I think we'd pass them in in a way that the engine wasn't trying to parse them as a Lucene query in the first place.