I would prefer to use SchemaSimilarityFactory as a global similarity and 
configure a per-field similarity of which some use a flat TF impl. Much simples 
and no need to patch anything, just build a custom sim.

-----Original message-----
> From:Upayavira <u...@odoko.co.uk>
> Sent: Wed 16-Jan-2013 21:22
> To: solr-user@lucene.apache.org
> Subject: Re: Disable term frequency for some fields in solr
> 
> There's gonna be two ways to do this - for yourself or for everyone.
> 
> For yourself, you'll want to subclass
> org.apache.lucene.search.similarities.DefaultSimilarity and
> org.apache.solr.search.similarities.DefaultSimilarityFactory.
> 
> Alternatively, patch those two files to allow setting the TF or the IDF
> via a configuration parameter, and post a patch to JIRA. I'm sure there
> are other folks that would want the feature, and would hope it would be
> accepted easily.
> 
> E.g. disableIDF=true or disableTF=true would make those functions just
> return 1.
> 
> My thoughts anyhow.
> 
> Upayavira
> 
> On Wed, Jan 16, 2013, at 11:37 AM, Amit Jha wrote:
> > Done same thing in solr3.6 and working but in sorl3.6 filed level of
> > similarity is not available. And Solr4 has Similarity Factories. So I was
> > not getting how do I do it on solr4. Which class do i need to extend and
> > move ahead.
> > 
> > 
> > On Wed, Jan 16, 2013 at 4:44 PM, Upayavira <u...@odoko.co.uk> wrote:
> > 
> > > For someone versed in Jav
> 

Reply via email to