On Sun, Feb 21, 2010 at 11:04 PM, Norman Wiechmann <n.wiechm...@gmx.net> wrote: > Hi, > > I'm wondering if there is a reason why the @Field annotation is restricted > to setters? The preferred way is to apply the annotation to fields. it is provided on setters also if you prefer the set/get xxx() route. > > In my case I would like to index beans from java using the solrj client > implementation. Transforming documents to beans is not required because I > use queries to Solr from JavaScript only. > > To avoid the creation of setter methods just to use the @Field annotation I > extended SolrServer to overwrite getBinder() and added an > DocumentObjectBinder implementation that supports @Field annotations at bean > property getter methods. > > For me it feels very unusual to add annotations to setters. It does not > match with the experience I have from other libraries like JPA or JAXB. > > Best, Norman >
-- ----------------------------------------------------- Noble Paul | Systems Architect| AOL | http://aol.com