SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-548
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Shay Banon
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

Have boost mapping declaration on specific fields/properties taken into account when searching on the all proeprty

Created: 20/Feb/08 02:57 PM   Updated: 02/Mar/08 09:49 AM
Component/s: Compass::Core
Affects Version/s: None
Fix Version/s: 2.0.0 M3


 Description  « Hide
When mapping in Compass, and setting certain property mapping boost level, it is not taken into account when searching on the all property. It should be supported, and if it hits a "token" in the all property that match a certain resource with a boost level, it should take that boost level into account.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Fernando Martins added a comment - 02/Mar/08 09:49 AM
The testcase:

public void testSimpleHighlightingWithAlias() {
CompassSession session = openSession();
CompassTransaction tr = session.beginTransaction();

setUpMultiPropertyData(session, new String[]{"parent bla"});
CompassQuery termQueryParent = session.queryBuilder().queryString("bla").toQuery();
termQueryParent.setAliases("parent");

CompassQuery termQueryA = session.queryBuilder().queryString("bla").toQuery();
termQueryA.setAliases("a");

CompassBooleanQueryBuilder boolQueryBuilder = session.queryBuilder().bool();
boolQueryBuilder.addShould(termQueryParent);
boolQueryBuilder.addShould(termQueryA);

CompassHits hits = boolQueryBuilder.toQuery().hits();
String fragment = hits.highlighter(0).fragment("text");
assertEquals("parent <b>bla</b>", fragment);
}