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 aerox7 <am...@me.com> on 2009/03/29 13:27:32 UTC

[Newbie]How to influante Revelance in Solr ?

Hi,
I have an index that contain pname (text), pdescription (text) and
popularity(sinteger).

My index contain this docs :

pname : hp printer
pdescription : hp printer C 330 blabla....
popularity : 20
---
pname : hp laptop
pdescription : hp laptop X125 Blabala...
popularity : 10
---
pname : hp jet
pdescription : hp jet JT554 blabla....
popularity : 10


I want to get results orderd by keyword matching (score) and popularity. 

When i tryed somthing like this : q=hp&sort=popularity desc, score desc
I get Hp printer, hp laptop and hp jet, so it works ! But when i try to
search hp jet (q=hp jet&sort=popularity desc, score desc) i get the same
result like the first query whos totaly wrong !!!!!

How to influante the score in my case ? for exemple give to the matching 1
factor and popularity 1.5 (or 2) 

(i'm newbie in solr and java...)

thank you.
-- 
View this message in context: http://www.nabble.com/-Newbie-How-to-influante-Revelance-in-Solr---tp22766595p22766595.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: [Newbie]How to influante Revelance in Solr ?

Posted by Ryan McKinley <ry...@gmail.com>.
On Mar 29, 2009, at 8:42 AM, Shalin Shekhar Mangar wrote:

> On Sun, Mar 29, 2009 at 4:57 PM, aerox7 <am...@me.com> wrote:
>
>>
>> I want to get results orderd by keyword matching (score) and  
>> popularity.
>>
>> When i tryed somthing like this : q=hp&sort=popularity desc, score  
>> desc
>> I get Hp printer, hp laptop and hp jet, so it works ! But when i  
>> try to
>> search hp jet (q=hp jet&sort=popularity desc, score desc) i get the  
>> same
>> result like the first query whos totaly wrong !!!!!
>>
>> How to influante the score in my case ? for exemple give to the  
>> matching 1
>> factor and popularity 1.5 (or 2)
>>
>
> Do not sort by popularity first as it will dominate the score. Look at
> function queries for influencing the score based on the popularity.
>
> http://wiki.apache.org/solr/FunctionQuery
>

also consider using the "dismax" parser with the 'bf' parameter.  I  
think the example has that configured, also check:

http://wiki.apache.org/solr/DisMaxRequestHandler#head-14b9ca618089829d139e6f3d6f52ff63e22a80d1

ryan

Re: [Newbie]How to influante Revelance in Solr ?

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Sun, Mar 29, 2009 at 4:57 PM, aerox7 <am...@me.com> wrote:

>
> I want to get results orderd by keyword matching (score) and popularity.
>
> When i tryed somthing like this : q=hp&sort=popularity desc, score desc
> I get Hp printer, hp laptop and hp jet, so it works ! But when i try to
> search hp jet (q=hp jet&sort=popularity desc, score desc) i get the same
> result like the first query whos totaly wrong !!!!!
>
> How to influante the score in my case ? for exemple give to the matching 1
> factor and popularity 1.5 (or 2)
>

Do not sort by popularity first as it will dominate the score. Look at
function queries for influencing the score based on the popularity.

http://wiki.apache.org/solr/FunctionQuery

-- 
Regards,
Shalin Shekhar Mangar.

Re: [Newbie]How to influante Revelance in Solr ?

Posted by Alexander Ramos Jardim <al...@gmail.com>.
2009/3/29 aerox7 <am...@me.com>

>
> Hi,
> I have an index that contain pname (text), pdescription (text) and
> popularity(sinteger).
>
> My index contain this docs :
>
> pname : hp printer
> pdescription : hp printer C 330 blabla....
> popularity : 20
> ---
> pname : hp laptop
> pdescription : hp laptop X125 Blabala...
> popularity : 10
> ---
> pname : hp jet
> pdescription : hp jet JT554 blabla....
> popularity : 10
>
>
> I want to get results orderd by keyword matching (score) and popularity.
>
> When i tryed somthing like this : q=hp&sort=popularity desc, score desc
> I get Hp printer, hp laptop and hp jet, so it works ! But when i try to
> search hp jet (q=hp jet&sort=popularity desc, score desc) i get the same
> result like the first query whos totaly wrong !!!!!
>

try searching q="hp jet" ?


>
> How to influante the score in my case ? for exemple give to the matching 1
> factor and popularity 1.5 (or 2)
>
> (i'm newbie in solr and java...)
>
> thank you.
> --
> View this message in context:
> http://www.nabble.com/-Newbie-How-to-influante-Revelance-in-Solr---tp22766595p22766595.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


-- 
Alexander Ramos Jardim