Hi,
Following up a related post I made on lucene-user yesterday, I've
tracked down what I consider to be a bug in the Query parser relating to
boosting boolean queries.
In short, I think it's reasonable for a user to want to boost all the
terms within a set of parentheses like this:
(fred jim bob)^2.0
However, this fails with the current query parser - the boost factor is
silently ignored.
Please find attached a patch that adds two assertions to the query
parser test, demonstrating the above problem. The patch also includes a
minor change to QueryParser.jj to fix the problem and a tweak to
BooleanQuery.toString() to help test it.
Regards,
--
Lee Mallabone.
Granta Design Ltd.
Following up a related post I made on lucene-user yesterday, I've
tracked down what I consider to be a bug in the Query parser relating to
boosting boolean queries.
In short, I think it's reasonable for a user to want to boost all the
terms within a set of parentheses like this:
(fred jim bob)^2.0
However, this fails with the current query parser - the boost factor is
silently ignored.
Please find attached a patch that adds two assertions to the query
parser test, demonstrating the above problem. The patch also includes a
minor change to QueryParser.jj to fix the problem and a tweak to
BooleanQuery.toString() to help test it.
Regards,
--
Lee Mallabone.
Granta Design Ltd.