[hibernate-dev] [search] FieldBridge API change re-visited (HSEARCH-904)

Hardy Ferentschik hardy at hibernate.org
Mon Sep 19 06:39:06 EDT 2011


Hi,

sorry to bring this issue up again, but when starting the refactoring for  
this issue (taking the approach
to make the bridge stateful) I noticed a problem. We thought that we could  
introduce

FieldBridge#initalize(String fieldName, LuceneOptions options)

while removing the same parameters from the set method. The assumption was  
that LuceneOptions are constant
for a given field. It turns out this is not the case. Due to dynamic  
boosting the boost factor can actually
change on each call to set.

The question is what to do now?

1. Just have FieldBridge#initalize(String fieldName) and keep the  
LuceneOptions in set?
2. Keep the stateless interface, but change set to
    Iterable<String> set(String name, Object value, Document document,  
LuceneOptions luceneOptions);
3. Try to find a way which does not require the changing LuceneOptions.  
See also comment on the Jira issue.

Thoughts?

--Hardy



More information about the hibernate-dev mailing list