[ https://issues.apache.org/jira/browse/LUCENE-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-3347: ---------------------------------- Attachment: LUCENE-3347.patch Patch with test, I think it's ready to commit! > XMLparser drops user boosting > ----------------------------- > > Key: LUCENE-3347 > URL: https://issues.apache.org/jira/browse/LUCENE-3347 > Project: Lucene - Java > Issue Type: Bug > Affects Versions: 3.1 > Reporter: moogie > Assignee: Uwe Schindler > Priority: Minor > Fix For: 3.4, 4.0 > > Attachments: LUCENE-3347.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > The lucene XML parser seems to convert user defined boosting back to default > 1.0 and thus boosting value is dropped from the query... > e.g. > {code:xml} > <BooleanQuery> > <Clause occurs="must"> > <BooleanQuery> > <Clause occurs="should"> > <UserQuery fieldName="Vehicle.Colour">red^66 > blue~^8</UserQuery> > </Clause> > </BooleanQuery> > </Clause> > <Clause occurs="should"> > <BooleanQuery> > <Clause occurs="should"> > <UserQuery > fieldName="Vehicle.Colour">black^0.01</UserQuery> > </Clause> > </BooleanQuery> > </Clause> > </BooleanQuery> > {code} > produces a lucene query: +( ( Vehicle.Colour:red^66 Vehicle.Colour:blue~0.5^8 > ) ) ( Vehicle.Colour:black ) > The expected query : +( ( Vehicle.Colour:red^66 Vehicle.Colour:blue~0.5^8 ) ) > ( Vehicle.Colour:black^0.01 ) > I have developed a work around by modifying line 77 of > UserInputQueryBuilder.java > from: > {code:java} > q.setBoost(DOMUtils.getAttribute(e,"boost",1.0f)); > {code} > to: > {code:java} > q.setBoost( DOMUtils.getAttribute( e, "boost", q.getBoost() ) ); > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org