|
LuceneOptions is really a bad name for what the class does. Initially the class was just a container class for some of the Lucene specific field option (index, store, term vector, etc), but then actual "action" methods (addFieldToDocument, addNumericFieldToDocument) got added.
At the time we decided to keep the name in order to keep backwards compatibility. I think it is at the time to change this. IndexContext might be a better name.
Aside of this I am wondering whether we should try to make bridges stateful. Lucene index options could then be passed to an initalize method of the bridge. This might be helpful for HSEARCH-904 as well. Also having stateful bridges might help to reuse the actual Field(able) instances used to add fields to the Document. This reusing of Fieldable is the preferred way of creating document fields in Lucene 4 (Sanne Grinovero wdyt?)
|