Hi Aman,
if you want to sort/filter/boost on a custom function query please take a
look at the Alba Framework, maybe it can be useful.

For example, you can define a new function query (and then
sort/filter/boost on it) simply by adding some annotations to your method,
as explained in the wiki:

https://github.com/leonardofoderaro/alba/wiki/Your-first-queryfunction:-the-title-length

Disclaimer: I'm the author of Alba. Please keep in mind it's a young
project, and it has never been used in production.

Thanks
Leonardo

On Thu, Sep 10, 2015 at 8:33 AM, Aman Tandon <amantandon...@gmail.com>
wrote:

> Hi,
>
> I figured it out to implement the same. I will be doing this by using the
> boost parameter
>
> e.g. http://server:8112/solr/products/select?q=jute&qf=title
> *&boost=product(1,product_guideline_score)*
>
> If there is any other alternative then please suggest.
>
> With Regards
> Aman Tandon
>
> On Thu, Sep 10, 2015 at 11:02 AM, Aman Tandon <amantandon...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I have a requirement to reorder the search results by multiplying the
> *text relevance
> > score* of a product with the *product_guideline_score,* which will be
> > stored in index and will have some floating point number.
> >
> > e.g. On searching the *jute* in title if we got some results ID1 & ID2
> >
> > ID1 -> title = jute
> >           score = 8.0
> > *          product_guideline_score = 2.0*
> >
> > ID2 -> title = jute bags
> >           score = 7.5
> > *          product_guideline_score** = 2.2*
> >
> > So the new score should be like this
> >
> > ID1 -> title = jute
> >           score = *product_score * 8 = 16.0*
> > *          product_guideline_score** = 2.0*
> >
> > ID2 -> title = jute bags
> >           score = *product_score * 7.5 = 16.5*
> > *          product_guideline_score** = 2.2*
> >
> > *So new ordering should be*
> >
> > ID2 -> title = jute bags
> >           score* = 16.5*
> >
> > ID1 -> title = jute
> >           score =* 16.0*
> >
> > How can I do this in single query on runtime in solr.
> >
> > With Regards
> > Aman Tandon
> >
>

Reply via email to