#131: Correct parentheses support in in search parsing ------------------------+--------------------------------------------------- Reporter: jblayloc | Owner: jblayloc Type: defect | Status: assigned Priority: critical | Milestone: Component: WebSearch | Version: Resolution: | Keywords: INSPIRE Invenio Syntax News Oct ------------------------+---------------------------------------------------
Comment (by simko): Replying to [comment:15 jblayloc]: > 2a is gibberish syntax and the query parser actually should be breaking on it. It is not fully gibberish: `(|kaon)` should be interpreted as a Boolean expression inside parens, due to the presence of `|`. `|kaon` is a legal search unit, meaning "find me <empty string> OR kaon", resulting in everything(*). The whole query then means "find me records containing word ellis AND NOT those containing word muon AND those containing anything". Yes, the third term does not really matter, but it is "legal", because `|kaon` is legal. (*) Since we start from the record universe, as it were. Kind of like `-kaon` returns every record not having word `kaon`. Though we could muse whether it would not be better to treat `|kaon` as `kaon`, returning records containing the word kaon, not everything. As Google seems to be doing. -- Ticket URL: <http://invenio-software.org/ticket/131#comment:18> Invenio <http://invenio-software.org>