You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2011/07/20 22:33:58 UTC

[jira] [Created] (LUCENE-3330) revise Scorer visitor API

revise Scorer visitor API
-------------------------

                 Key: LUCENE-3330
                 URL: https://issues.apache.org/jira/browse/LUCENE-3330
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Robert Muir
             Fix For: 4.0


Currently there is an (expert) API in scorer to allow you to take a scorer, and visit its children etc (e.g. booleanquery).

I think we should improve this, so its general to all queries.

The current issues are:
* the current api is hardcoded for booleanquery's Occurs, but we should support other types of children (e.g. disjunctionmax)
* it can be difficult to use the API, because of the amount of generics and the visitor callback API. 
* the current API enforces a DFS traversal when you might prefer BFS instead.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (LUCENE-3330) revise Scorer visitor API

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

Robert Muir commented on LUCENE-3330:
-------------------------------------

Thanks for taking a look, if there are no objections i'll commit in a few days, and open a followup issue to ensure that all scorers support traversing, there are still a lot that need to implement the method in order to support access to any inner scorers.

For example, in my opinion even ConstantScoreQuery shoudl allow you to get access to its inner scorer via some "CONSTANT_SCORED" relationship or similar.

> revise Scorer visitor API
> -------------------------
>
>                 Key: LUCENE-3330
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3330
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>             Fix For: 4.0
>
>         Attachments: LUCENE-3330.patch
>
>
> Currently there is an (expert) API in scorer to allow you to take a scorer, and visit its children etc (e.g. booleanquery).
> I think we should improve this, so its general to all queries.
> The current issues are:
> * the current api is hardcoded for booleanquery's Occurs, but we should support other types of children (e.g. disjunctionmax)
> * it can be difficult to use the API, because of the amount of generics and the visitor callback API. 
> * the current API enforces a DFS traversal when you might prefer BFS instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (LUCENE-3330) revise Scorer visitor API

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

Robert Muir updated LUCENE-3330:
--------------------------------

    Attachment: LUCENE-3330.patch

here's a patch, i didnt add support for existing scorers though:

in my opinion, all scorers that contain other scorers should implement this api so that you can traverse them.

> revise Scorer visitor API
> -------------------------
>
>                 Key: LUCENE-3330
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3330
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>             Fix For: 4.0
>
>         Attachments: LUCENE-3330.patch
>
>
> Currently there is an (expert) API in scorer to allow you to take a scorer, and visit its children etc (e.g. booleanquery).
> I think we should improve this, so its general to all queries.
> The current issues are:
> * the current api is hardcoded for booleanquery's Occurs, but we should support other types of children (e.g. disjunctionmax)
> * it can be difficult to use the API, because of the amount of generics and the visitor callback API. 
> * the current API enforces a DFS traversal when you might prefer BFS instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (LUCENE-3330) revise Scorer visitor API

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

Michael McCandless commented on LUCENE-3330:
--------------------------------------------

I like this simplification!  I agree baking in BQ's relationships into this Scorer API is not good, and it's better to let the caller decide how/when/what subs to visit.

+1 to commit

> revise Scorer visitor API
> -------------------------
>
>                 Key: LUCENE-3330
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3330
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>             Fix For: 4.0
>
>         Attachments: LUCENE-3330.patch
>
>
> Currently there is an (expert) API in scorer to allow you to take a scorer, and visit its children etc (e.g. booleanquery).
> I think we should improve this, so its general to all queries.
> The current issues are:
> * the current api is hardcoded for booleanquery's Occurs, but we should support other types of children (e.g. disjunctionmax)
> * it can be difficult to use the API, because of the amount of generics and the visitor callback API. 
> * the current API enforces a DFS traversal when you might prefer BFS instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Resolved] (LUCENE-3330) revise Scorer visitor API

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

Robert Muir resolved LUCENE-3330.
---------------------------------

    Resolution: Fixed
      Assignee: Robert Muir

> revise Scorer visitor API
> -------------------------
>
>                 Key: LUCENE-3330
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3330
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>             Fix For: 4.0
>
>         Attachments: LUCENE-3330.patch
>
>
> Currently there is an (expert) API in scorer to allow you to take a scorer, and visit its children etc (e.g. booleanquery).
> I think we should improve this, so its general to all queries.
> The current issues are:
> * the current api is hardcoded for booleanquery's Occurs, but we should support other types of children (e.g. disjunctionmax)
> * it can be difficult to use the API, because of the amount of generics and the visitor callback API. 
> * the current API enforces a DFS traversal when you might prefer BFS instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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