[hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-372) ClassBridges are not handled in projection

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu May 28 08:05:14 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard updated HSEARCH-372:
-------------------------------------

    Fix Version/s:     (was: 3.1.1)
                   3.2.0
       Issue Type: New Feature  (was: Bug)

I've analyzed the code a bit.

I think I did not activate this feature because in most ClassBridge, we don't know which field name is used.
This could work however:
 - if the user explicitly adds a name() to the @ClassBridge
 - and the bridge impl does not mess around and use the field name straight

I am contemplating the idea of adding an interface implemented by bridges and declaring which field is used (I dont' think I like the idea very much though as field names could be dynamic), or simply a flag declaring the bridge as a good citizen to increase error discovery.

I am not willing to rush an impl of this new feature (with or wo interface) in a micro release but we can help you implement it (see below the key parts that needs enhancement to make it work).

Implementation:
 - DocumentBuilderIndexedEntity.checkAllowFieldSelection does nto take classBridge into account
 - DocumentBuilderIndexedEntity.processFieldsForProjection does nto take class bridges into account

Side note:
 - DocumentBuilderIndexedEntity.checkAllowFieldSelection does not take embeddedBridges into account, it probably should but we could have some circularity issue?

> ClassBridges are not handled in projection
> ------------------------------------------
>
>                 Key: HSEARCH-372
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-372
>             Project: Hibernate Search
>          Issue Type: New Feature
>    Affects Versions: 3.1.0.GA
>            Reporter: Thomas Goetz
>            Priority: Critical
>             Fix For: 3.2.0
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list