You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2009/05/21 03:56:45 UTC

[jira] Created: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Small fix in CustomScoreQuery JavaDoc
-------------------------------------

                 Key: LUCENE-1650
                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Javadocs
    Affects Versions: 2.9, 3.0
            Reporter: Simon Willnauer
            Priority: Minor
             Fix For: 2.9


I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 

I'm quite curious why the method:
 public float customScore(int doc, float subQueryScore, float valSrcScores[]) 

calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.

I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
- customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727675#action_12727675 ] 

Yonik Seeley commented on LUCENE-1650:
--------------------------------------

Not sure why you wanted me to take a peek - this isn't part of the original Solr function query stuff, so I won't know any more than anyone else.
Anyway the current code looks like it's working as designed?  Perhaps it wasn't the best interface, but not worth breaking compatibility over, and not necessary to improve for 2.9 IMO.


> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch, LUCENE-1650.patch, LUCENE-1650.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723589#action_12723589 ] 

Mark Miller commented on LUCENE-1650:
-------------------------------------

Im going to commit this soon, both changes.

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch, LUCENE-1650.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718286#action_12718286 ] 

Mark Miller commented on LUCENE-1650:
-------------------------------------

This looks like it makes sense to me. Unless anyone objects, I'd like to commit it for 2.9.

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer updated LUCENE-1650:
------------------------------------

    Attachment: customScoreQuery_CodeChange+JavaDoc.patch
                customScoreQuery_JavaDoc.patch

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727688#action_12727688 ] 

Mark Miller commented on LUCENE-1650:
-------------------------------------

bq. Not sure why you wanted me to take a peek - this isn't part of the original Solr function query stuff, so I won't know any more than anyone else.

Because you knew that, and I didnt :) And because your pretty smart about these things. And your usually happy to ignore when you are not interested, so I figured you always had that out here :) I think there are usually okay odds that you might know more than someone else.

bq. Anyway the current code looks like it's working as designed? Perhaps it wasn't the best interface, but not worth breaking compatibility over, and not necessary to improve for 2.9 IMO.

That's  kind of what I started thinking, and I just wanted someone smarter than me to confirm or deny. It also just seemed like it was *very* unlikely that it would affect anyone if the change was made, so why not just make it consistent. I could go either way, but technically it is a backcompat break, and it would be easier to just leave it.

I'll just push it off 2.9 for now.

I'm just trying to resolve/push 2.9 issues - didnt mean to single you out for any specific work :)

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch, LUCENE-1650.patch, LUCENE-1650.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated LUCENE-1650:
--------------------------------

    Attachment: LUCENE-1650.patch

updated to trunk in any case.

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch, LUCENE-1650.patch, LUCENE-1650.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated LUCENE-1650:
--------------------------------

    Attachment: LUCENE-1650.patch

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch, LUCENE-1650.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated LUCENE-1650:
--------------------------------

    Affects Version/s:     (was: 3.0)
                           (was: 2.9)
        Fix Version/s:     (was: 2.9)
                       3.1
             Assignee:     (was: Mark Miller)

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch, LUCENE-1650.patch, LUCENE-1650.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller reassigned LUCENE-1650:
-----------------------------------

    Assignee: Mark Miller

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1650) Small fix in CustomScoreQuery JavaDoc

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727612#action_12727612 ] 

Mark Miller commented on LUCENE-1650:
-------------------------------------

No I'm not :) Yonik, could you take a peak at this?

Why the javadoc change? It used to refer to the method parameter - that makes sense to me ? Where is valSrcScore bound?

As far as the second change, its a logical change, but it is a back compat change. I'm thinking it could be considered a bug fix, but the old weirdness worked if
you followed the javadoc no?

I'm pro the change, and it prob doesnt make sense to add a static or property to allow the old behaviour, but another opinion...

> Small fix in CustomScoreQuery JavaDoc
> -------------------------------------
>
>                 Key: LUCENE-1650
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1650
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.9, 3.0
>            Reporter: Simon Willnauer
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: customScoreQuery_CodeChange+JavaDoc.patch, customScoreQuery_JavaDoc.patch, LUCENE-1650.patch
>
>
> I have fixed the javadoc for  "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch 
> I'm quite curious why the method:
>  public float customScore(int doc, float subQueryScore, float valSrcScores[]) 
> calls public float customScore(int doc, float subQueryScore, float valSrcScore])  only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
> I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
> - customScoreQuery_CodeChange+JavaDoc.patch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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