lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Wiechmann <n.wiechm...@gmx.net>
Subject Solrj @Field getter annotation
Date Sun, 21 Feb 2010 17:34:20 GMT
Hi,

I'm wondering if there is a reason why the @Field annotation is 
restricted to setters?

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

Mime
View raw message