[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-904) Have TwoWayFieldBridge report which fields should be loaded from a Document

Hardy Ferentschik (JIRA) noreply at atlassian.com
Fri Sep 9 11:08:02 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43489#comment-43489 ] 

Hardy Ferentschik commented on HSEARCH-904:
-------------------------------------------

The last discussed solution was to create a new interface a bridge can optionally implement (similar to _ParameterizedBridge_) - _FieldNameReportingBridge_:

{code}
public interface FieldNameReportingBridge {
	Iterable<String> getGeneratedFieldNames();
}
{code}

Maybe we should introduce a wrapper object though to be able to not only return the names, but also analyzer names (see HSEARCH-664). 
To properly support this though the bridge implementation needs to know the property name to which the bridge applies. For this reason it makes sense to make bridges stateful and add an _initalize_ method which takes the field name (property name in most cases) and the _LuceneOptions_. These two parameters could then be removed from the _set_ method of _FieldBridge_ simplifying the API. 
The drawback of making the bridges stateful is a increased memory footprint.

> Have TwoWayFieldBridge report which fields should be loaded from a Document
> ---------------------------------------------------------------------------
>
>                 Key: HSEARCH-904
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-904
>             Project: Hibernate Search
>          Issue Type: Task
>            Reporter: Sanne Grinovero
>             Fix For: 4.0.0.Beta1
>
>
> This is needed to use a FieldSelector in more cases. See also HSEARCH-213.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list