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 dirmanhafiz <di...@gmail.com> on 2016/06/19 10:09:58 UTC

Can someone explain about Sweetspot Similarity ?

Hi , Im Dirman and im trying experiment solr with sweetspot similarity,,
can someone tell me min max in sweetspot similarity is about lengthdoc ?
i have average lengthdoc 3-205 tokens / doc and why while i wrote in my
schema.xml parameter sweetspot similairity didnt work ?

<field name="textSS" type="text_generalSS"  indexed="true" stored="false"
multiValued="true" >

      <similarity class="solr.SweetSpotSimilarityFactory">
        <int name="lengthNormMin">10</int>
        <int name="lengthNormMax">50</int>
        <float name="lengthNormSteepness">0.5</float>
      </similarity>

   </field>

i want make out of range min max lengthdoc  will be punished 



--
View this message in context: http://lucene.472066.n3.nabble.com/Can-someone-explain-about-Sweetspot-Similarity-tp4283248.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Can someone explain about Sweetspot Similarity ?

Posted by Chris Hostetter <ho...@fucit.org>.
: Fwiw, here's example of per field similarity
: https://cwiki.apache.org/confluence/display/solr/Other+Schema+Elements

Similarities can be defined per field *TYPE* ... not per field (as shown 
in the examples on that page)


-Hoss
http://www.lucidworks.com/

Re: Can someone explain about Sweetspot Similarity ?

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Fwiw, here's example of per field similarity
https://cwiki.apache.org/confluence/display/solr/Other+Schema+Elements
20 июня 2016 г. 2:49 пользователь "Shawn Heisey" <ap...@elyograg.org>
написал:

> On 6/19/2016 4:09 AM, dirmanhafiz wrote:
> > Hi , Im Dirman and im trying experiment solr with sweetspot similarity,,
> > can someone tell me min max in sweetspot similarity is about lengthdoc ?
> > i have average lengthdoc 3-205 tokens / doc and why while i wrote in my
> > schema.xml parameter sweetspot similairity didnt work ?
> >
> > <field name="textSS" type="text_generalSS"  indexed="true" stored="false"
> > multiValued="true" >
> >
> >       <similarity class="solr.SweetSpotSimilarityFactory">
> >         <int name="lengthNormMin">10</int>
> >         <int name="lengthNormMax">50</int>
> >         <float name="lengthNormSteepness">0.5</float>
> >       </similarity>
> >
> >    </field>
>
> I do not think you can specify similarity on a per-field basis like
> that.  I think that the similarity must be defined at the top schema
> level, and it applies to the entire collection (or core for non-cloud
> mode).
>
> Thanks,
> Shawn
>
>

Re: Can someone explain about Sweetspot Similarity ?

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/19/2016 4:09 AM, dirmanhafiz wrote:
> Hi , Im Dirman and im trying experiment solr with sweetspot similarity,,
> can someone tell me min max in sweetspot similarity is about lengthdoc ?
> i have average lengthdoc 3-205 tokens / doc and why while i wrote in my
> schema.xml parameter sweetspot similairity didnt work ?
>
> <field name="textSS" type="text_generalSS"  indexed="true" stored="false"
> multiValued="true" >
>
>       <similarity class="solr.SweetSpotSimilarityFactory">
>         <int name="lengthNormMin">10</int>
>         <int name="lengthNormMax">50</int>
>         <float name="lengthNormSteepness">0.5</float>
>       </similarity>
>
>    </field>

I do not think you can specify similarity on a per-field basis like
that.  I think that the similarity must be defined at the top schema
level, and it applies to the entire collection (or core for non-cloud mode).

Thanks,
Shawn


Re: Can someone explain about Sweetspot Similarity ?

Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi,

Sweet spot is designed to punish too long or too short documents.

Did you reindex?

Can you see the mention of sweet spot in debugQuery=true response?

Ahmet



On Sunday, June 19, 2016 2:18 PM, dirmanhafiz <di...@gmail.com> wrote:
Hi , Im Dirman and im trying experiment solr with sweetspot similarity,,
can someone tell me min max in sweetspot similarity is about lengthdoc ?
i have average lengthdoc 3-205 tokens / doc and why while i wrote in my
schema.xml parameter sweetspot similairity didnt work ?

<field name="textSS" type="text_generalSS"  indexed="true" stored="false"
multiValued="true" >

      <similarity class="solr.SweetSpotSimilarityFactory">
        <int name="lengthNormMin">10</int>
        <int name="lengthNormMax">50</int>
        <float name="lengthNormSteepness">0.5</float>
      </similarity>

   </field>

i want make out of range min max lengthdoc  will be punished 



--
View this message in context: http://lucene.472066.n3.nabble.com/Can-someone-explain-about-Sweetspot-Similarity-tp4283248.html
Sent from the Solr - User mailing list archive at Nabble.com.