lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Similarity coefficient for more exact matching
Date Thu, 10 May 2012 08:26:41 GMT
Similarity.setDefault(new MySimilarity()) is certainly better than the
2 calls I recommended.  Thanks.

I find it hard to see why one might not want to do this in normal
usage but have a vague recollection of someone once outlining some
obscure scenarios where different similarities at index and search
time made sense.


--
Ian.


On Fri, May 4, 2012 at 5:32 PM, Paul Hill <paul@metajure.com> wrote:
>> [use] IndexWriterConfig.setSimilarity() and
>> IndexSearcher.setSimilarity(), unless you are clever or like being confused.
>>
>> SweetSpotSimilarity might also be worth a look.
>>
>> --
>> Ian.
>
> Being even less clever,  I just make sure I set:
>
> Similarity.setDefault(new MySimilarity())
>
> when crawling and searching, so everything uses the same similarity strategies.
>
> Checking the 3.4 code IndexWriterConfig and IndexSearcher, both default to Similarity.getDefault().
>
> Any thoughts on scenarios where you'd not push a custom similarity into the default position?
>
> -Paul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message