]
Anders Soee commented on HSEARCH-951:
-------------------------------------
A backport to 3.4.2 would be appreciated.
/Anders.
excludeLimit() has no effect on QueryBuilder.range().above() queries
--------------------------------------------------------------------
Key: HSEARCH-951
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-951
Project: Hibernate Search
Issue Type: Bug
Components: query
Affects Versions: 3.4.1.Final, 4.0.0.CR1
Reporter: Marko Lukša
Assignee: Hardy Ferentschik
Priority: Trivial
Fix For: 4.0.0.CR2
When executing the following code, the {{excludeLimit()}} call has no effect.
{code}
Query query = queryBuilder
.range()
.onField("letter")
.ignoreFieldBridge()
.ignoreAnalyzer()
.above("b").excludeLimit()
.createQuery();
{code}
It's caused by a minor bug in
{{ConnectedMultiFieldsRangeQueryBuilder.excludeLimit()}}:
{code}
public RangeTerminationExcludable excludeLimit() {
if ( rangeContext.getFrom() != null && rangeContext.getTo() != null ) {
rangeContext.setExcludeTo( true );
}
else if ( rangeContext.getFrom() != null ) {
rangeContext.setExcludeTo( true ); <---- should be From, not To
}
else if ( rangeContext.getTo() != null ) {
rangeContext.setExcludeTo( true );
}
else {
throw new AssertionFailure( "Both from and to clause of a range query are
null" );
}
return this;
}
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: