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 Midas A <te...@gmail.com> on 2016/09/19 06:05:50 UTC
Boost according to values
i have n items in my search result with popularity (1,2,3,4....n) . I want
higher popularity item should come first then next popularity item
say for example
a) item with popularity n,
b) item with popularity n -1,
c) item with popularity n -2,
d) item with popularity n - 3,
e) item with popularity n - 4,
f) item with popularity n - 5,
....
....
y) item with popularity 2,
z) item with popularity 1,
what should be my query if relevance for items are constant
Re: Boost according to values
Posted by Walter Underwood <wu...@wunderwood.org>.
1. Use edismax and the boost parameter. Multiplicative boosting works much, much better than the additive boost used in dismax.
2. Use a log-scaled popularity value. If you know popularity is always greater than 1, use “1 + log(popularity)”. It is a bit safer to use “1 + log(max(1, popularity))”.
3. Multiple that value by a weight to make it a tie-breaker. If two items have the same title (or text), you want the more popular one first. But you rarely want a different result boosted above a match. No matter how popular the movie “Twilight” is, it should not rank above “Twilight Zone” for the query “twilight zone”.
wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/ (my blog)
> On Sep 18, 2016, at 11:49 PM, Rajendra Gaikwad <ra...@gmail.com> wrote:
>
> Hi Midas,
> I am sure,even though you have results with constant relavance, sorting
> will give you expected results.
> Anyway there is parameter bf in dismax parser. Add parameter
> bf=field(popularity) to query, It is similar to boost items by value in
> popularity field. hence ultimately higher popularity items occurs on top.
> Add parameter to your query bf=field(popularity)&defType=edismax
>
>
> Thanks,
> Rajendra Gaikwad
>
> On Mon, Sep 19, 2016, 11:55 AM Midas A <te...@gmail.com> wrote:
>
>> my use case do not suggest me to sort . i have set of data with same
>> relevance.
>>
>> what should be query in that case .
>>
>> On Mon, Sep 19, 2016 at 11:51 AM, Rajendra Gaikwad <ra...@gmail.com>
>> wrote:
>>
>>> Hi Midas,
>>>
>>> Sort search results on popularity field by desc order.
>>> E.g popularity is field in the index which stores popularity information.
>>>
>>> http://localhost:8983/solr/mycollection/select?q=*:*&sort=popularity
>> desc
>>>
>>> Thanks,
>>> Rajendra Gaikwad
>>> Please execuse typo
>>>
>>>
>>>
>>> On Mon, Sep 19, 2016, 11:36 AM Midas A <te...@gmail.com> wrote:
>>>
>>>> i have n items in my search result with popularity (1,2,3,4....n) . I
>>> want
>>>> higher popularity item should come first then next popularity item
>>>>
>>>>
>>>> say for example
>>>> a) item with popularity n,
>>>> b) item with popularity n -1,
>>>> c) item with popularity n -2,
>>>> d) item with popularity n - 3,
>>>> e) item with popularity n - 4,
>>>> f) item with popularity n - 5,
>>>> ....
>>>> ....
>>>> y) item with popularity 2,
>>>> z) item with popularity 1,
>>>>
>>>>
>>>> what should be my query if relevance for items are constant
>>>>
>>> --
>>>
>>> sent from mobile, execuse typo
>>>
>>
> --
>
> sent from mobile, execuse typo
Re: Boost according to values
Posted by Rajendra Gaikwad <ra...@gmail.com>.
Hi Midas,
I am sure,even though you have results with constant relavance, sorting
will give you expected results.
Anyway there is parameter bf in dismax parser. Add parameter
bf=field(popularity) to query, It is similar to boost items by value in
popularity field. hence ultimately higher popularity items occurs on top.
Add parameter to your query bf=field(popularity)&defType=edismax
Thanks,
Rajendra Gaikwad
On Mon, Sep 19, 2016, 11:55 AM Midas A <te...@gmail.com> wrote:
> my use case do not suggest me to sort . i have set of data with same
> relevance.
>
> what should be query in that case .
>
> On Mon, Sep 19, 2016 at 11:51 AM, Rajendra Gaikwad <ra...@gmail.com>
> wrote:
>
> > Hi Midas,
> >
> > Sort search results on popularity field by desc order.
> > E.g popularity is field in the index which stores popularity information.
> >
> > http://localhost:8983/solr/mycollection/select?q=*:*&sort=popularity
> desc
> >
> > Thanks,
> > Rajendra Gaikwad
> > Please execuse typo
> >
> >
> >
> > On Mon, Sep 19, 2016, 11:36 AM Midas A <te...@gmail.com> wrote:
> >
> > > i have n items in my search result with popularity (1,2,3,4....n) . I
> > want
> > > higher popularity item should come first then next popularity item
> > >
> > >
> > > say for example
> > > a) item with popularity n,
> > > b) item with popularity n -1,
> > > c) item with popularity n -2,
> > > d) item with popularity n - 3,
> > > e) item with popularity n - 4,
> > > f) item with popularity n - 5,
> > > ....
> > > ....
> > > y) item with popularity 2,
> > > z) item with popularity 1,
> > >
> > >
> > > what should be my query if relevance for items are constant
> > >
> > --
> >
> > sent from mobile, execuse typo
> >
>
--
sent from mobile, execuse typo
Re: Boost according to values
Posted by Midas A <te...@gmail.com>.
my use case do not suggest me to sort . i have set of data with same
relevance.
what should be query in that case .
On Mon, Sep 19, 2016 at 11:51 AM, Rajendra Gaikwad <ra...@gmail.com>
wrote:
> Hi Midas,
>
> Sort search results on popularity field by desc order.
> E.g popularity is field in the index which stores popularity information.
>
> http://localhost:8983/solr/mycollection/select?q=*:*&sort=popularity desc
>
> Thanks,
> Rajendra Gaikwad
> Please execuse typo
>
>
>
> On Mon, Sep 19, 2016, 11:36 AM Midas A <te...@gmail.com> wrote:
>
> > i have n items in my search result with popularity (1,2,3,4....n) . I
> want
> > higher popularity item should come first then next popularity item
> >
> >
> > say for example
> > a) item with popularity n,
> > b) item with popularity n -1,
> > c) item with popularity n -2,
> > d) item with popularity n - 3,
> > e) item with popularity n - 4,
> > f) item with popularity n - 5,
> > ....
> > ....
> > y) item with popularity 2,
> > z) item with popularity 1,
> >
> >
> > what should be my query if relevance for items are constant
> >
> --
>
> sent from mobile, execuse typo
>
Re: Boost according to values
Posted by Rajendra Gaikwad <ra...@gmail.com>.
Hi Midas,
Sort search results on popularity field by desc order.
E.g popularity is field in the index which stores popularity information.
http://localhost:8983/solr/mycollection/select?q=*:*&sort=popularity desc
Thanks,
Rajendra Gaikwad
Please execuse typo
On Mon, Sep 19, 2016, 11:36 AM Midas A <te...@gmail.com> wrote:
> i have n items in my search result with popularity (1,2,3,4....n) . I want
> higher popularity item should come first then next popularity item
>
>
> say for example
> a) item with popularity n,
> b) item with popularity n -1,
> c) item with popularity n -2,
> d) item with popularity n - 3,
> e) item with popularity n - 4,
> f) item with popularity n - 5,
> ....
> ....
> y) item with popularity 2,
> z) item with popularity 1,
>
>
> what should be my query if relevance for items are constant
>
--
sent from mobile, execuse typo
Re: Boost according to values
Posted by Rajendra Gaikwad <ra...@gmail.com>.
Hi Midas,
Sort search results on popularity field by desc order.
E.g popularity is field in the index which stores popularity information.
http://localhost:8983/solr/mycollection/select?q=*:*&sort=popularity desc
Thanks,
Rajendra Gaikwad
Please execuse typo
On Mon, Sep 19, 2016, 11:36 AM Midas A <te...@gmail.com> wrote:
> i have n items in my search result with popularity (1,2,3,4....n) . I want
> higher popularity item should come first then next popularity item
>
>
> say for example
> a) item with popularity n,
> b) item with popularity n -1,
> c) item with popularity n -2,
> d) item with popularity n - 3,
> e) item with popularity n - 4,
> f) item with popularity n - 5,
> ....
> ....
> y) item with popularity 2,
> z) item with popularity 1,
>
>
> what should be my query if relevance for items are constant
>
--
sent from mobile, execuse typo