#534: WebSearch: fix bug "expr1"->"expr2" parses as "expr1, "->", expr2"
------------------------+----------------------------
Reporter: valkyrie | Owner: valkyrie
Type: defect | Status: assigned
Priority: trivial | Milestone:
Component: WebSearch | Version:
Resolution: | Keywords: INSPIRE syntax
------------------------+----------------------------
Changes (by simko):
* status: in_merge => assigned
Comment:
The branch does not seem to solve the problem. Here is an example of a
query that does not work:
{{{
(year:"1992"->"1996" AND title:of)
}}}
The added test case says that:
{{{
def test_sqpp_quoted_expr1_arrow_quoted_expr2(self):
"""SearchQueryParenthesisedParser = \"expr1\"->\"expr2\""""
self.assertEqual(self.parser.parse_query('"expr1"->"expr2"'),
['+', '"expr1"', '+', '->', '+', '"expr2"'])
}}}
but this is actually wrong: the span query symbol (`->`) should not be
treated as a standalone search operand, it is always part of a bigger
expression `X->Y`.
(E.g. see how the same but non-parenthesised example query works in the
master branch; the parenthesised example query should return the same
results.)
--
Ticket URL: <http://invenio-software.org/ticket/534#comment:4>
Invenio <http://invenio-software.org>