You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by elisabeth benoit <el...@gmail.com> on 2014/10/09 12:21:47 UTC

per field similarity not working with solr 4.2.1

Hello,

I am using Solr 4..2.1 and I've tried to use a per field similarity, as
described in

https://apache.googlesource.com/lucene-solr/+/c5bb5cd921e1ce65e18eceb55e738f40591214f0/solr/core/src/test-files/solr/collection1/conf/schema-sim.xml

so in my schema I have

<schema name="search" version="1.4">
<similarity class="solr.SchemaSimilarityFactory"/>

and a custom similarity in fieldtype definition

    <fieldType name="text" class="solr.TextField"
positionIncrementGap="100">
     <similarity
class="com.company.lbs.solr.search.similarity.NoTFSimilarity"/>
       <analyzer type="index">
...

but it is not working

when I send a request with debugQuery=on, instead of [
NoTFSimilarity], I see []

or to give an example, I have


weight(catchall:bretagn in 2575) []

instead of weight(catchall:bretagn in 2575) [NoTFSimilarity]

Anyone has a clue what I am doing wrong?

Best regards,
Elisabeth