lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Khludnev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-5882) Support scoreMode parameter for BlockJoinParentQParser
Date Sun, 02 Aug 2015 19:58:04 GMT

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

Mikhail Khludnev commented on SOLR-5882:
----------------------------------------

QParser test found a bug in [ToParentBlockJoinQuery.BlockJoinScorer.nextDoc()|https://github.com/apache/lucene-solr/blob/trunk/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java#L300]
it occurs on ScoreMode.Min 
{code}
minScore = Math.min(childFreq, minScore); // shouldn't it be childScore, not Freq?
{code}
I attach a patch includes this fix and test coverage.

> Support scoreMode parameter for BlockJoinParentQParser
> ------------------------------------------------------
>
>                 Key: SOLR-5882
>                 URL: https://issues.apache.org/jira/browse/SOLR-5882
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 4.8
>            Reporter: Andrey Kudryavtsev
>            Assignee: Mikhail Khludnev
>             Fix For: 5.3
>
>         Attachments: SOLR-5882.patch
>
>
> Today BlockJoinParentQParser creates queries with hardcoded _scoring mode_ "None": 
> {code:borderStyle=solid}
>   protected Query createQuery(Query parentList, Query query) {
>     return new ToParentBlockJoinQuery(query, getFilter(parentList), ScoreMode.None);
>   }
> {code} 
> Analogically BlockJoinChildQParser creates queries with hardcoded _doScores_ "false":
> {code:borderStyle=solid}
>   protected Query createQuery(Query parentListQuery, Query query) {
>     return new ToChildBlockJoinQuery(query, getFilter(parentListQuery), false);
>   }
> {code}
> I propose to have ability to configure this scoring options via query syntax.
> Syntax for parent queries can be like:
> {code:borderStyle=solid}
> {!parent which=type:parent scoreMode=None|Avg|Max|Total}
> {code} 
> For child query:
> {code:borderStyle=solid}
> {!child of=type:parent doScores=true|false}
> {code} 



--
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


Mime
View raw message