We're updating the issue view to help you get more done. 

Support projection for ClassBridges that pass and use the field name passed in @ClassBridge.name

Description

Values that were stored by a ClassBridge are not accessible via projection. Luke shows the values, so I'm sure they are there. I think Emmanuel is already aware of the problem, as stated here: https://forum.hibernate.org/viewtopic.php?f=9&t=996373&view=previous

As I run Hibernate Search from within JBoss I'm not quit sure how to demonstrate this bug in a standalone testcase. If someone gave me a hint on how this could be done without too much pain, I'd supply a test case.

I use the following annotation on the class to be indexed:

@ClassBridge(
name = "amount_of_students",
index = Index.UN_TOKENIZED,
store = Store.YES,
impl = StudentsSizeBridge.class)
public class Teacher implements Serializable {

...

}

As I said, the amount_of_students value is correctly stored in the Lucene index (viewable with Luke), but if I try to project the value within a FullTextQuery it is always empty.

Environment

None

Status

Assignee

Emmanuel Bernard

Reporter

TomG

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Affects versions

3.1.0.GA

Priority

Critical