Hi Pragyanshis,

I faced a similar problem few days ago and I was advised on this forum to
override Solr DefaultSimilairy calculation to return always a constant
value for idf. I think, in your case you'd also want to suppress the length
norm which will require re-indexing as length norm is calculated during
indexing.

The link of my issue is as below:
http://lucene.472066.n3.nabble.com/Possible-issue-in-edismax-td4037397.html

Cheers,
Sandeep


On 14 February 2013 19:20, Pragyanshis Pattanaik <pragyans...@outlook.com>wrote:

> Hi,
> My schema is like below.
>      <fields>           <dynamicField name="Subject-Name-*" type="string"
> indexed="true" stored="true"/>                <dynamicField
> name="Subject-Mark-*" type="int" indexed="true" stored="true"/>    </fields>
> My need is to search only three subject fields and boost those subjects
> which has a higher Mark(Mark can be in between 1 - 10).
> Again Top subjects will get a higher boost than preceding one's.
> Like if a search term is present in Subject-Name-1,Then it will get a
> higher boost than Subject-Name-2 and Subject-Name-3.
> Similarly Subject-Mark-1 will get higher boost than Subject-Mark-2 and
> Subject-Mark-3.
> To achieve this i am querying over subject fields and my query looks like
> below.
>
> q=+Economics+Geography&wt=xml&deftype=edismax&qf=Subject-Name-1+Subject-Name-2+Subject-Name-3&bq=Subject-Name-1%3AEconomics%3BGeography^50.0+Subject-Mark-1%3A20^90.0+Subject-Mark-1%3A9^80.0+Subject-Mark-1%3A8^70.0+Subject-Mark-1%3A7^60.0+Subject-Name-2%3AEconomics%3BGeography^45.0+Subject-Mark-2%3A20^90.0+Subject-Mark-2%3A9^80.0+Subject-Mark-2%3A8^70.0+Subject-Mark-2%3A7^60.0+Subject-Name-3%3AEconomics%3BGeography^40.0+Subject-Mark-3%3A20^90.0+Subject-Mark-3%3A9^80.0+Subject-Mark-3%3A8^70.0+Subject-Mark-3%3A7^60.0
> If i am having four documents like below
>     <doc>    <str name="Subject-Name-1">Economics</str>    <str
> name="Subject-Name-1">Geography</str>    <str
> name="Subject-Name-1">History</str>    <int name="Subject-Name-1">7</int>
>  <int name="Subject-Name-1">7</int>    <int name="Subject-Name-1">6</int>
>  </doc>        <doc>    <str name="Subject-Name-1">Economics</str>    <str
> name="Subject-Name-1">History</str>    <str
> name="Subject-Name-1">Geography</str>    <int name="Subject-Name-1">8</int>
>    <int name="Subject-Name-1">8</int>    <int name="Subject-Name-1">5</int>
>    </doc>        <doc>    <str name="Subject-Name-1">Economics</str>
>  <str name="Subject-Name-1">History</str>    <str
> name="Subject-Name-1">Geography</str>    <int name="Subject-Name-1">9</int>
>    <int name="Subject-Name-1">6</int>    <int name="Subject-Name-1">7</int>
>    </doc>        <doc>    <str name="Subject-Name-1">Economics</str>
>  <str name="Subject-Name-1">Mathematics</str>    <str
> name="Subject-Name-1">History</str>    <int name="Subject-Name-1">7</int>
>  <int name="Subject-Name-1">7</int>    <int name="Subject-Name-1">6</int>
>  </doc>
>
> then i am getting a higher score for last document which has only one of
> the search term !!!
> But in my situation it is not applicable. My requirement is,if a document
> has only one term then they should get a lower score than the documents
> which are having both of the terms.
> Is it happening because of idf(rarer terms give higher contribution to the
> total score) ?
> Or there is something wrong with my query ?
> Can anybody help me to achieve the desired output.
> Thanks in advance

Reply via email to