| Cody Lerum Hello, This feature is already available. Just do this:
FullTextEntityManager fullTextEntityManager = org.hibernate.search.jpa.Search.getFullTextEntityManager(em);
QueryBuilder builder = fullTextEntityManager.getSearchFactory().buildQueryBuilder().forEntity(IndexedEntity.class).get();
TermContext ctx = builder.keyword();
for(IndexedField field : indexedFields){
ctx.onField(field.getName()).boostedTo(field.getBoost());
}
Each boost will be applied to the field mentioned just before, and only that field. Please tell us if this solves your problem, so that I can close this ticket. |