lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LUCENE-3347) XMLparser drops user boosting
Date Sat, 30 Jul 2011 22:10:10 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Uwe Schindler resolved LUCENE-3347.
-----------------------------------

    Resolution: Fixed

Committed trunk revision: 1152525
Committed 3.x revision: 1152526

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message