Gurjot -
Take a look at the Solr Relevancy Cookbook
http://wiki.apache.org/solr/SolrRelevancyCookbook - It provides some
good guidelines for boosting term ranking.

cheers,
--bemansell

On Mon, May 18, 2009 at 7:29 AM, Gurjot Singh <gurjotas...@gmail.com> wrote:

> Hi,
> In the Solr schema file I have a integer type field named as 'ContentType'
> as follows
>
> <field name="ContentType" type="int" indexed="true" stored="true"/>
>
> The values of this field can be one of the following:
>
> 1(for News) , 2(for Reviews), 3(for Opinion), 4(for Blogs)
>
> I have a scenario in which when a user does a search the result should be
> sorted by Best match(i.e. from Highest relevancy score to lowest score). At
> the same time I want the solr documents having Blogs as the value in the
> ContentType field appear at the bottom in the search result below the
> documents having News, Reviews or Opinion as the value in the ContentType.
>
> The way I am doing this is by first doing a sort on the ContentType Field
> and then doing a sort by score as follows.
>
> sort=ContentType asc,score desc
>
> Is there a better solution to do the same.
>
> Thanks
> Gurjot
>

Reply via email to