You can get the FieldBridge via the public org.hibernate.search.metadata.FieldDescriptor. Access to this descriptors is via SearchFactoryIntegrator#getIndexedTypeDescriptor. Once you have an IndexedTypeDescriptor there are several ways to navigate it. Is this sufficient? If not, the way to go is to extend the public meta data API, not expose internal impl classes.
I am sorry. I didn't find that one . Then my pull request is obsolete.
What I am trying to accomplish is that I want all my data from the index instead of looking it up from the database. I know this can always be accomlished via setProjection(...), but I don't like that. If you want to create DTO containing all the data from that (or even the entire Object hierarchy), you have to write all the code on your own and again for each type in your indexes. If this explanation is still lacking, you can just take a look at the (pretty basic) implementation I already have for that:
https://github.com/Hotware/Lucene-Extension/blob/hibernate-search-adaption/lucene-extension-hsearch/src/main/java/com/github/hotware/lucene/extension/bean/hsearch/HibernateSearchDocumentToBeanConverter.java
|