: The code is here: http://pastebin.com/50ugqRfA : : <http://pastebin.com/50ugqRfA>and my schema.xml configuration entry for : similarity is: : <similarity class="com.umamao.solr.ShortFieldNormSimilarity"/>
exactly what version of Solr are you using? what does the full field/fieldType declaration look like in your schema.xml for the filed you are testing with? what does your exactl query request look like? The trunk branch of lucene/solr has made some changes to how similarity works (it's now very much per field) and how you declare your similarity in schema.xml ... if i remember correctly, the syntax from 3.1 to declare a "global" similarity *should* still work in 4.x as a way to declare the "default" used by fields that don't define a similarity, but there may be a bug (or i may be remembering incorrectly ... if the syntax really is no longer used at all then we should make sure it logs a nice fat error on startup) : > > I added some debug information and my class is loaded, but it is not used : > > when queries are made. Please clarify exactly how you are testing this and what you mean by "is not used when queries are made" ... it's important to rule out the possibility that you are just missunderstanding how the similarity methods are used. -Hoss