Re: Document boost in Solr

2015-11-15 Thread Andrea Open Source
Hi Aditya,
Looking at the explanation seems that you have a 50.0 boost applied on your 
PRODUCT_TITLE field, 1.5 applied to your PRODUCT_CONTENT field and then you 
have a phrase query with slop 10 and boost 50 on title and boost 1.5 on 
content. In your question you talk about using "rank" as document boost but 
from this query is not clear as I am not sure what those 1.5 and 50.0 come from.

King Regards,
Andrea Roggerone

> On 15/nov/2015, at 06:21, Aditya  wrote:
> 
> Hi
> 
> I am able to analyse the score using http://explain.solr.pl/
> 
> Score of 1st record:
>100% 27.12627 sum of the following:
>33.47% 9.078974 sum of the following:
>19.34% 5.2460585 (MATCH) max of:
>19.34% 5.2460585 PRODUCT_TITLE:machin^50.0
>- 0.37926888 PRODUCT_CONTENT:machin^1.5
>14.13% 3.8329153 (MATCH) max of:
>14.13% 3.8329153 PRODUCT_TITLE:learn^50.0
>- 0.28544438 PRODUCT_CONTENT:learn^1.5
>66.53% 18.047297 (MATCH) max of:
>66.53% 18.047297 PRODUCT_TITLE:"machin learn"~10^50.0
>- 1.3227714 PRODUCT_CONTENT:"machin learn"~10^1.5
> Score of 14th record. This supposed to come in less than 10.
> 100% 14.135922 sum of the following:
>35.52% 5.0206614 sum of the following:
>18.74% 2.6496599 (MATCH) max of:
>18.74% 2.6496599 PRODUCT_TITLE:machin^50.0
>- 0.22348635 PRODUCT_CONTENT:machin^1.5
>16.77% 2.3710015 (MATCH) max of:
>16.77% 2.3710015 PRODUCT_TITLE:learn^50.0
>- 0.18167646 PRODUCT_CONTENT:learn^1.5
>64.48% 9.115261 (MATCH) max of:
>64.48% 9.115261 PRODUCT_TITLE:"machin learn"~10^50.0
>- 0.7794506 PRODUCT_CONTENT:"machin learn"~10^1.5
> 
> How can I analyse whether the document boost is applied or not.
> 
> Regards
> Aditya
> 
> 
> On Sat, Nov 14, 2015 at 8:49 PM, Aditya 
> wrote:
> 
>> I am not able to understand the debug information.
>> 
>> Any specific parameter to look for?
>> 
>> Regards
>> Aditya
>> 
>> On Sat, Nov 14, 2015 at 6:42 PM, Alexandre Rafalovitch >> wrote:
>> 
>>> Did you try using debug.explain.other and seeing how it is ranked?
 On 14 Nov 2015 6:28 am, "Aditya"  wrote:
 
 Hi
 
 My website www.findbestopensource.com provides search over millions of
 open
 source projects.
 
 I recently found this issue in my website. Each project will have its
 description and rank and other set of fields. Rank is set as document
 boost, so that when user performs a search, high ranked projects should
 appear first.
 
 It was working fine with previous versions of Solr. Some time back I
>>> moved
 to 4.10 and after that I am facing this issue. I added a high ranked
 project and when I did a search the project is not showing up in the
>>> search
 results. It is showing the results which were added in older versions of
 Solr.
 
 I am using Solr 4.10  and using Solrj library.
 
 Regards
 Aditya
>> 
>> 


Re: Boost query at search time according set of roles with least performance impact

2015-11-13 Thread Andrea Open Source
Hi Alessandro,
Thanks for answering. Unfortunately bq is not enough as I have several roles 
that I need to score in different ways. I was thinking of building a custom 
function that reads the weights of the roles from solr config and applies them 
at runtime. I am a bit concerned about performance though and that's the reason 
behind my question. What's your thought about such solution?

King Regards,
Andrea Roggerone

> On 09/nov/2015, at 12:29, Alessandro Benedetti  wrote:
> 
> ehehe your request is kinda delicate :
> 1)  I can't store the
> payload at index time
> 2) Passing all the weights at query time is not an option
> 
> So you seem to exclude all the possible solutions ...
> Anyway, just thinking loud, have you tried the edismax query parser and the
> boost query feature?
> 
> 1) the first strategy is the one you would prefer to avoid :
> you define the AuthorRole, then you use the Boost Query parameter to boost
> differently your roles :
> AuthorRole:"ADMIN"^100 AuthorRole:"ARCHITECT"^50 ect ...
> If you have 20 roles , the query could be not readable.
> 
> 2) you index the "weight" for the role in the original document.
> The you use a Boost Function according to your requirement ( using there
> "weight" field)
> 
> Hope this helps,
> 
> Cheers
> 
> e.g. from the Solr wiki
> The bq (Boost Query) Parameter
> 
> The bq parameter specifies an additional, optional, query clause that will
> be added to the user's main query to influence the score. For example, if
> you wanted to add a relevancy boost for recent documents:
> q=cheese
> bq=date:[NOW/DAY-1YEAR TO NOW/DAY]
> 
> You can specify multiple bq parameters. If you want your query to be parsed
> as separate clauses with separate boosts, use multiple bq parameters.
> The bf (Boost Functions) Parameter
> 
> The bf parameter specifies functions (with optional boosts) that will be
> used to construct FunctionQueries which will be added to the user's main
> query as optional clauses that will influence the score. Any function
> supported natively by Solr can be used, along with a boost value. For
> example:
> recip(rord(myfield),1,2,3)^1.5
> 
> Specifying functions with the bf parameter is essentially just shorthand
> for using the bq param combined with the {!func} parser.
> 
> For example, if you want to show the most recent documents first, you could
> use either of the following:
> bf=recip(rord(creationDate),1,1000,1000)
>  ...or...
> bq={!func}recip(rord(creationDate),1,1000,1000)
> 
> On 6 November 2015 at 16:44, Andrea Roggerone <
> andrearoggerone.o...@gmail.com> wrote:
> 
>> Hi all,
>> I am working on a mechanism that applies additional boosts to documents
>> according to the role covered by the author. For instance we have
>> 
>> CEO|5 Architect|3 Developer|1 TeamLeader|2
>> 
>> keeping in mind that an author could cover multiple roles (e.g. for a
>> design document, a Team Leader could be also a Developer).
>> 
>> I am aware that is possible to implement a function that leverages
>> payloads, however the weights need to be configurable so I can't store the
>> payload at index time.
>> Passing all the weights at query time is not an option as we have more than
>> 20 roles and query readability and performance would be heavily affected.
>> 
>> Do we have any "out of the box mechanism" in Solr to implement the
>> described behavior? If not, what other options do we have?
> 
> 
> 
> -- 
> --
> 
> Benedetti Alessandro
> Visiting card : http://about.me/alessandro_benedetti
> 
> "Tyger, tyger burning bright
> In the forests of the night,
> What immortal hand or eye
> Could frame thy fearful symmetry?"
> 
> William Blake - Songs of Experience -1794 England


Re: How to disable the admin interface

2015-10-04 Thread Andrea Open Source
Hi,
As Shawn is saying, disabling the Admin interface is not the right way to go. 
If you just disable the admin interface users could still run queries and you 
don't want that. The solution that you're looking for, is enabling the ssh 
authentication so only the users with the right certificate can query Solr or 
reach the admin.


King Regards,
Andrea Roggerone

> On 04/ott/2015, at 08:11, Shawn Heisey  wrote:
> 
>> On 10/3/2015 9:17 PM, Siddhartha Singh Sandhu wrote:
>> I want to disable the admin interface in SOLR. I understand that
>> authentication is available in the solrcloud mode but until that happens I
>> want to disable the admin interface in my prod environment.
>> 
>> How can I do this?
> 
> Why do you need to disable the admin interface?  The admin interface is
> just a bunch of HTML, CSS, and Javascript.  It downloads code that runs
> inside your browser and turns it into a tool that can manipulate Solr.
> 
> The parts of Solr that need protecting are the APIs that the admin
> interface calls.  When authentication is enabled in the newest Solr
> versions, it is not the admin interface that is protected, it is those
> APIs called by the admin interface.  Anyone can use those APIs directly,
> completely independent of the interface.
> 
> Thanks
> Shawn
>