You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ryan Josal (JIRA)" <ji...@apache.org> on 2015/07/09 00:48:04 UTC

[jira] [Comment Edited] (SOLR-6234) Scoring modes for query time join

    [ https://issues.apache.org/jira/browse/SOLR-6234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14619521#comment-14619521 ] 

Ryan Josal edited comment on SOLR-6234 at 7/8/15 10:47 PM:
-----------------------------------------------------------

I've attached otherHandler.patch, which is a patch on top of the existing ScoreJoinQParserPlugin.java from the Dec 14 patch, which shows changes to add a feature where the user can supply handler=/select (for example) in localparams, to apply the config from the handler in the other core.  You'll notice that the request is built from localParams instead of "params" so that whatever your current core params are don't override the other core configured params.  If this breaks something, it could be changed to only do that when the "handler" localParam is present.  This patch is quick and dirty because it uses reflection to get the defaults,appends,invariants config from the BaseRequestHandler class.  Really, the access level of those variables should change, or the method should be moved there.

Personally I'm using this feature to join my deals core with my products core as the othercore, and I wanted it to do a regular search against the products core.  This approach could actually be used in the \!join qparser too.  If this patch is useful for somebody, great!


was (Author: rjosal):
I've attached otherHandler.patch, which is a patch on top of the existing ScoreJoinQParserPlugin.java from the Dec 14 patch, which shows changes to add a feature where the user can supply handler=/select (for example) in localparams, to apply the config from the handler in the other core.  You'll notice that the request is built from localParams instead of "params" so that whatever your current core params are don't override the other core configured params.  If this breaks something, it could be changed to only do that when the "handler" localParam is present.  This patch is quick and dirty because it uses reflection to get the defaults,appends,invariants config from the BaseRequestHandler class.  Really, the access level of those variables should change, or the method should be moved there.

Personally I'm using this feature to join my deals core with my products core as the othercore, and I wanted it to do a regular search against the products core.  This approach could actually be used in the !join qparser too.  If this patch is useful for somebody, great!

> Scoring modes for query time join 
> ----------------------------------
>
>                 Key: SOLR-6234
>                 URL: https://issues.apache.org/jira/browse/SOLR-6234
>             Project: Solr
>          Issue Type: New Feature
>          Components: query parsers
>    Affects Versions: 5.3
>            Reporter: Mikhail Khludnev
>            Assignee: Timothy Potter
>              Labels: features, patch, test
>             Fix For: 5.3
>
>         Attachments: SOLR-6234.patch, SOLR-6234.patch, otherHandler.patch
>
>
> it adds {{scorejoin}} query parser which calls Lucene's JoinUtil underneath. It supports:
> - {{score=none|avg|max|total}} local param (passed as ScoreMode to JoinUtil)
>  - {{score=none}} is *default*, eg if you *omit* this localparam 
> - supports {{b=100}} param to pass {{Query.setBoost()}}.
> - {{multiVals=true|false}} is introduced 
> - there is a test coverage for cross core join case. 
> - so far it joins string and multivalue string fields (Sorted, SortedSet, Binary), but not Numerics DVs. follow-up LUCENE-5868  
> -there was a bug in cross core join, however there is a workaround for it- it's fixed in Dec'14 patch.
> Note: the development of this patch was sponsored by an anonymous contributor and approved for release under Apache License.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org