
| Key: |
CMP-548
|
| Type: |
New Feature
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Shay Banon
|
| Reporter: |
Shay Banon
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
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.
|
|
Description
|
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. |
Show » |
|
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);
}