lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: per-fieldtype similarity not working
Date Fri, 01 Jun 2012 14:59:02 GMT
On Fri, Jun 1, 2012 at 5:13 AM, Markus Jelsma
<markus.jelsma@openindex.io> wrote:
> Thanks but i am clearly missing something? We declare the similarity in the fieldType
just as in the example and looking at the example again i don't see how it's being done differently.
What am i missnig and where do i miss it? :)
>

Hi Markus, checkout the last line at the bottom:
 <!-- default similarity, defers to the fieldType -->
 <similarity class="solr.SchemaSimilarityFactory"/>

When this is set, it means IndexSearcher/IndexWriter use a
PerFieldSimilarityWrapper that delegates based to the Solr schema
fieldtype.

Note this is just a simple ordinary similarity impl
(http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/similarities/SchemaSimilarityFactory.java),
you could also write your own that works differently.

-- 
lucidimagination.com

Mime
View raw message