Re: Boosting Fields Based On The Query Provided

2018-03-20 Thread Shawn Heisey
On 3/20/2018 2:25 PM, Mukhopadhyay, Aratrika wrote:
>  I have a solr query which I am having a hard time configuring as I would 
> want it configured. Suppose I have a situation where I have two fields 
> field1(host field) and field2 (url field). I want a specific host to be 
> bubbled to the top for all terms except for when I am searching for specific 
> people in which case I want the URL to their landing page returned first. I 
> have configured the dismax query parser in my solrconfig but it seems that 
> the boost being applied is arbitrary .



>
> 
>   edismax
>   *:*
>name="bq">host:(www.starwars.com)^10http://www.starwars.com)%5e10%3c/str>>
>   Carrie Fisher
>   url:( 
> http\:\/\/www.imdb.com\/name\/nm402/)^8
> Mark Hamill
>   url:( 
> http\:\/\/www.imdb.com\/name\/nm434/)^8
>
>   

I think there's a fundamental misunderstanding of how "defaults" works.

I have no idea what happens with multiple "q" parameters, which you have
configured in defaults.  I do know that if your request includes a "q"
parameter, then what you've put in defaults for "q" is going to be
overridden and ignored.

This section of the documentation covers defaults, appends, and invariants:

https://lucene.apache.org/solr/guide/6_6/requesthandlers-and-searchcomponents-in-solrconfig.html#RequestHandlersandSearchComponentsinSolrConfig-SearchHandlers

I think the Query Elevation Component might be the kind of functionality
you're after.  What you're trying to do with defaults is NOT going to work.

https://lucene.apache.org/solr/guide/6_6/the-query-elevation-component.html

Thanks,
Shawn



RE: Boosting Fields Based On The Query Provided

2018-03-22 Thread Mukhopadhyay, Aratrika
Thanks for your reply Shawn. The query elevation worked for us. I have another 
question though. Right now I have ways to handle specific queries in the 
elevate.xml. The concern I am having is that I may have hundreds of queries 
that need to return different pages first. Is the only way to do this via the 
elevate.xml or is there a better approach for instance boosting fields ?  When 
I am boosting fields in this fashion it is not working for me : 



  edismax
   url^50 host^30 content^20 title^10


  elevator

  


Thanks for your help .

Aratrika Mukhopadhyay
-Original Message-
From: Shawn Heisey [mailto:apa...@elyograg.org] 
Sent: Tuesday, March 20, 2018 6:03 PM
To: solr-user@lucene.apache.org
Subject: Re: Boosting Fields Based On The Query Provided

On 3/20/2018 2:25 PM, Mukhopadhyay, Aratrika wrote:
>  I have a solr query which I am having a hard time configuring as I would 
> want it configured. Suppose I have a situation where I have two fields 
> field1(host field) and field2 (url field). I want a specific host to be 
> bubbled to the top for all terms except for when I am searching for specific 
> people in which case I want the URL to their landing page returned first. I 
> have configured the dismax query parser in my solrconfig but it seems that 
> the boost being applied is arbitrary .



>
> 
>   edismax
>   *:*
>name="bq">host:(www.starwars.com)^10https://urldefense.proofpoint.com/v2/url?u=http-3A__www.starwars.com-29-255e10-253c_str&d=DwID-g&c=L93KkjKsAC98uTvC4KvQDTmmq1mJ2vMPtzuTpFgX8gY&r=fbfOUDlf9NEzjz9RxL3c7eXnjEvWEy5WPCDMJD237NoEoCTMyiD1VH-RfTq9OP14&m=1RjiyUG9se2vpXYg-oLAiacdECUE6khXtuvegnw_nb0&s=QkEnIzj19X_nqC298QkAUDbjv_zmP1Xr9Vn_z6BQXoM&e=
>  >>
>   Carrie Fisher
>   url:( 
> http\:\/\/www.imdb.com\/name\/nm402/<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.imdb.com_name_nm402_&d=DwID-g&c=L93KkjKsAC98uTvC4KvQDTmmq1mJ2vMPtzuTpFgX8gY&r=fbfOUDlf9NEzjz9RxL3c7eXnjEvWEy5WPCDMJD237NoEoCTMyiD1VH-RfTq9OP14&m=1RjiyUG9se2vpXYg-oLAiacdECUE6khXtuvegnw_nb0&s=ka0--rJJLml1zFZu_P1xPisIiLpXR5LwsIMm82TuoUk&e=
>  >)^8
> Mark Hamill
>   url:( 
> http\:\/\/www.imdb.com\/name\/nm434/<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.imdb.com_name_nm434_&d=DwID-g&c=L93KkjKsAC98uTvC4KvQDTmmq1mJ2vMPtzuTpFgX8gY&r=fbfOUDlf9NEzjz9RxL3c7eXnjEvWEy5WPCDMJD237NoEoCTMyiD1VH-RfTq9OP14&m=1RjiyUG9se2vpXYg-oLAiacdECUE6khXtuvegnw_nb0&s=sVRAvHN3kkJVjN8XTAWjZS85tUmOXp9W4exWvMPpGUk&e=
>  >)^8
>
>   

I think there's a fundamental misunderstanding of how "defaults" works.

I have no idea what happens with multiple "q" parameters, which you have 
configured in defaults.  I do know that if your request includes a "q"
parameter, then what you've put in defaults for "q" is going to be overridden 
and ignored.

This section of the documentation covers defaults, appends, and invariants:

https://urldefense.proofpoint.com/v2/url?u=https-3A__lucene.apache.org_solr_guide_6-5F6_requesthandlers-2Dand-2Dsearchcomponents-2Din-2Dsolrconfig.html-23RequestHandlersandSearchComponentsinSolrConfig-2DSearchHandlers&d=DwID-g&c=L93KkjKsAC98uTvC4KvQDTmmq1mJ2vMPtzuTpFgX8gY&r=fbfOUDlf9NEzjz9RxL3c7eXnjEvWEy5WPCDMJD237NoEoCTMyiD1VH-RfTq9OP14&m=1RjiyUG9se2vpXYg-oLAiacdECUE6khXtuvegnw_nb0&s=LcNEhj3Y-S5KMW2HP0CG9t9UpRgEVsTcP7u8QgqW3tk&e=
 

I think the Query Elevation Component might be the kind of functionality you're 
after.  What you're trying to do with defaults is NOT going to work.

https://urldefense.proofpoint.com/v2/url?u=https-3A__lucene.apache.org_solr_guide_6-5F6_the-2Dquery-2Delevation-2Dcomponent.html&d=DwID-g&c=L93KkjKsAC98uTvC4KvQDTmmq1mJ2vMPtzuTpFgX8gY&r=fbfOUDlf9NEzjz9RxL3c7eXnjEvWEy5WPCDMJD237NoEoCTMyiD1VH-RfTq9OP14&m=1RjiyUG9se2vpXYg-oLAiacdECUE6khXtuvegnw_nb0&s=I6TENNcAZab0ZE_j0tZ8hm8_7nuNFqhBwoey4Mm1T0E&e=
 

Thanks,
Shawn