You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Karl Wettin (JIRA)" <ji...@apache.org> on 2007/01/13 14:11:27 UTC

[jira] Created: (LUCENE-775) Searcher code creating Hits is somewhat messy

Searcher code creating Hits is somewhat messy
---------------------------------------------

                 Key: LUCENE-775
                 URL: https://issues.apache.org/jira/browse/LUCENE-775
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Karl Wettin
            Priority: Trivial
         Attachments: searcher.diff

This patch makes sure all Hits-resulting queries sent to Searcher pass though the same methods, rather than an ad hoc Hits call per method call. Did it so it would be easier for me to implement this decorated searcher cache of mine.

I could not find any implementations overriding the methods I set final, so I think it is allright.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (LUCENE-775) Searcher code creating Hits is somewhat messy

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464669 ] 

Hoss Man commented on LUCENE-775:
---------------------------------

I agree that's messy and should be cleaned up .. while we're at it the Hits constructor has just as much redundency.

i don't think it's safe to make those methods final though ... there may not be any subclasses in the tree, but that's no garuntee there aren't users with their own subclasses (consider all the people who might have written a proxy cache like you are but needed to override all of those methods to do so)

can you explain this...

+  /** Sub class ad hoc IndexReader coupling */
+  protected IndexSearcher() {
+  }

"reader" is package protected, so any out of package subclass that uses this constructor is pretty much screwed right? .. how is would this constructor be useful?



> Searcher code creating Hits is somewhat messy
> ---------------------------------------------
>
>                 Key: LUCENE-775
>                 URL: https://issues.apache.org/jira/browse/LUCENE-775
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Karl Wettin
>            Priority: Trivial
>         Attachments: searcher.diff
>
>
> This patch makes sure all Hits-resulting queries sent to Searcher pass though the same methods, rather than an ad hoc Hits call per method call. Did it so it would be easier for me to implement this decorated searcher cache of mine.
> I could not find any implementations overriding the methods I set final, so I think it is allright.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (LUCENE-775) Searcher code creating Hits is somewhat messy

Posted by "Karl Wettin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464708 ] 

Karl Wettin commented on LUCENE-775:
------------------------------------

> can you explain this...
> 
> +  /** Sub class ad hoc IndexReader coupling */
> +  protected IndexSearcher() {
> +  }
> 
> "reader" is package protected, so any out of package subclass that uses this
>  constructor is pretty much screwed right? .. how is would this constructor be useful?

Sorry, that is an old artifact from a hack, not ment for the patch.  I'll refresh the patch.

> i don't think it's safe to make those methods final though ... there may not be any 
> subclasses in the tree, but that's no garuntee there aren't users with their own subclasses
> (consider all the people who might have written a proxy cache like you are but needed 
> to override all of those methods to do so) 

I personally  think they should change their code to override only the non-final method call. Anything else would be overkill. At least that is what I concluded while making these changes, hence the finals. But if it is final or not does not matter much to me. It is all good as long all Hits-returining method calls pass by that last non-final method in this patch.

> Searcher code creating Hits is somewhat messy
> ---------------------------------------------
>
>                 Key: LUCENE-775
>                 URL: https://issues.apache.org/jira/browse/LUCENE-775
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Karl Wettin
>            Priority: Trivial
>         Attachments: searcher.diff
>
>
> This patch makes sure all Hits-resulting queries sent to Searcher pass though the same methods, rather than an ad hoc Hits call per method call. Did it so it would be easier for me to implement this decorated searcher cache of mine.
> I could not find any implementations overriding the methods I set final, so I think it is allright.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Closed: (LUCENE-775) Searcher code creating Hits is somewhat messy

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

Karl Wettin closed LUCENE-775.
------------------------------

    Resolution: Won't Fix

More nasty old code I'm getting ridth of.

> Searcher code creating Hits is somewhat messy
> ---------------------------------------------
>
>                 Key: LUCENE-775
>                 URL: https://issues.apache.org/jira/browse/LUCENE-775
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Karl Wettin
>            Priority: Trivial
>         Attachments: searcher.diff
>
>
> This patch makes sure all Hits-resulting queries sent to Searcher pass though the same methods, rather than an ad hoc Hits call per method call. Did it so it would be easier for me to implement this decorated searcher cache of mine.
> I could not find any implementations overriding the methods I set final, so I think it is allright.

-- 
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-775) Searcher code creating Hits is somewhat messy

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

Karl Wettin updated LUCENE-775:
-------------------------------

    Attachment: searcher.diff

> Searcher code creating Hits is somewhat messy
> ---------------------------------------------
>
>                 Key: LUCENE-775
>                 URL: https://issues.apache.org/jira/browse/LUCENE-775
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Karl Wettin
>            Priority: Trivial
>         Attachments: searcher.diff
>
>
> This patch makes sure all Hits-resulting queries sent to Searcher pass though the same methods, rather than an ad hoc Hits call per method call. Did it so it would be easier for me to implement this decorated searcher cache of mine.
> I could not find any implementations overriding the methods I set final, so I think it is allright.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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