I have looked into that similarity plugin in the past and as far as I can
tell, it is partially wrong. Judging by the elasticsearch code, there is no
way to change the similarity depending if you are indexing or querying. The
similarity is simply tied to a field and it is used at all times. Someone
please correct me if I am wrong.

Besides that, writing your own similarity plugin is simple. You just need
one class extending AbstractSimilarityProvider and another class with the
actual similarity, which probably extends DefaultSimilarity. No need for a
plugin, you just need the classes in the elasticsearch classpath at startup.

Cheers,

Ivan


On Wed, Jan 15, 2014 at 9:17 AM, Mukul Gupta <[email protected]> wrote:

> I have read about that module but the thing is I have to set idf to 1.
> Actually, I want common terms to give more weight in my search. Now, when I
> googled about it, it says overriding the default similarity class is the
> only way to achieve it. That's the reason why I'm looking for these plugins.
>
>
> On Wed, Jan 15, 2014 at 10:35 PM, [email protected] <
> [email protected]> wrote:
>
>> The plugin is outdated.
>>
>> You can override similarity by standard ES 0.90+
>>
>>
>> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-similarity.html
>>
>> Jörg
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEMeNc4MpEO82L6KfLFsZziqdUO8F1LoRMgq3NrSyucqg%40mail.gmail.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAAVTvp5vDnq7w4rkA7CWNJUNpHmG9ztYdiN5u%3D1tj-%3DjvJSMUQ%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQD8OXROhz4R1oMaL6TbcvjEhQdRh8sFvNpcxgc_2Y3VSA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to