You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Chris Harris (JIRA)" <ji...@apache.org> on 2009/01/10 00:02:02 UTC

[jira] Created: (SOLR-952) TokenOrderingFilter class is defined in more than one java file

TokenOrderingFilter class is defined in more than one java file
---------------------------------------------------------------

                 Key: SOLR-952
                 URL: https://issues.apache.org/jira/browse/SOLR-952
             Project: Solr
          Issue Type: Bug
          Components: highlighter
    Affects Versions: 1.4
            Reporter: Chris Harris
            Priority: Minor


The class TokenOrderingFilter is defined, with identical text, both in org/apache/solr/highlight/DefaultSolrHighlighter.java and org/apache/solr/util/HighlightingUtils.java. I assume this is not good, from a code maintenance perspective.

Verified this in Solr trunk r733155.

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


[jira] Updated: (SOLR-952) duplicated code in (Default)SolrHighlighter and HighlightingUtils

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

Hoss Man updated SOLR-952:
--------------------------

    Attachment: SOLR-952.patch

Patch for cleaning up HighlighterUtils.

I'm not a subject matter expert here, but from what i can tell this hsould be back-compat for anyone still using the utils class.

I don't plan on committing unless someone more familiar with the highlighting code looks it over and gives it a thumbs up.  (HighlightingUtils doesn't currently have any tests to verify against)

> duplicated code in (Default)SolrHighlighter and HighlightingUtils
> -----------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>         Attachments: SOLR-952.patch
>
>
> A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.

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


[jira] Issue Comment Edited: (SOLR-952) TokenOrderingFilter class is defined in more than one java file

Posted by "Chris Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662555#action_12662555 ] 

ryguasu edited comment on SOLR-952 at 1/9/09 3:37 PM:
-----------------------------------------------------------

I did a brief look through the svn logs:

 * In r4222248, the class was first added. It was added to org/apache/solr/util/SolrPluginUtils.java. The purpose of this commit was: "order tokens by startOffset when highlighting"
 * In r510338 it was moved moved to org/apache/solr/util/HighlightingUtils.java.
 * In r639490 org/apache/solr/highlight/DefaultSolrHighlighter.java was created and the econd copy was added there; this revision did not, however, touch org/apache/solr/util/HighlightingUtils.java


      was (Author: ryguasu):
    I did a brief look through the svn logs:

 * The class started (I think) in org/apache/solr/util/SolrPluginUtils.java
 * In r510338 it was moved moved to org/apache/solr/util/HighlightingUtils.java.
 * In r639490 org/apache/solr/highlight/DefaultSolrHighlighter.java was created and the econd copy was added there; this revision did not, however, touch org/apache/solr/util/HighlightingUtils.java

  
> TokenOrderingFilter class is defined in more than one java file
> ---------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>
> The class TokenOrderingFilter is defined, with identical text, both in org/apache/solr/highlight/DefaultSolrHighlighter.java and org/apache/solr/util/HighlightingUtils.java. I assume this is not good, from a code maintenance perspective.
> Verified this in Solr trunk r733155.

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


[jira] Updated: (SOLR-952) duplicated code in (Default)SolrHighlighter and HighlightingUtils

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

Otis Gospodnetic updated SOLR-952:
----------------------------------

      Description: A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.  (was: 
A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.)
    Fix Version/s: 1.4

> duplicated code in (Default)SolrHighlighter and HighlightingUtils
> -----------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-952.patch
>
>
> A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.

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


[jira] Issue Comment Edited: (SOLR-952) TokenOrderingFilter class is defined in more than one java file

Posted by "Chris Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662555#action_12662555 ] 

ryguasu edited comment on SOLR-952 at 1/9/09 3:39 PM:
-----------------------------------------------------------

I did a brief look through the svn logs:

 * In r422248, the class was first added. It was added to org/apache/solr/util/SolrPluginUtils.java. The purpose of this commit was: "order tokens by startOffset when highlighting"
 * In r510338 it was moved moved to org/apache/solr/util/HighlightingUtils.java.
 * In r639490 org/apache/solr/highlight/DefaultSolrHighlighter.java was created and the econd copy was added there; this revision did not, however, touch org/apache/solr/util/HighlightingUtils.java


      was (Author: ryguasu):
    I did a brief look through the svn logs:

 * In r4222248, the class was first added. It was added to org/apache/solr/util/SolrPluginUtils.java. The purpose of this commit was: "order tokens by startOffset when highlighting"
 * In r510338 it was moved moved to org/apache/solr/util/HighlightingUtils.java.
 * In r639490 org/apache/solr/highlight/DefaultSolrHighlighter.java was created and the econd copy was added there; this revision did not, however, touch org/apache/solr/util/HighlightingUtils.java

  
> TokenOrderingFilter class is defined in more than one java file
> ---------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>
> The class TokenOrderingFilter is defined, with identical text, both in org/apache/solr/highlight/DefaultSolrHighlighter.java and org/apache/solr/util/HighlightingUtils.java. I assume this is not good, from a code maintenance perspective.
> Verified this in Solr trunk r733155.

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


[jira] Commented: (SOLR-952) duplicated code in (Default)SolrHighlighter and HighlightingUtils

Posted by "Mike Klaas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674830#action_12674830 ] 

Mike Klaas commented on SOLR-952:
---------------------------------

HighlightingUtils has been deprecated for at least one release; can't we just rip it out?

> duplicated code in (Default)SolrHighlighter and HighlightingUtils
> -----------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>         Attachments: SOLR-952.patch
>
>
> A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.

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


[jira] Commented: (SOLR-952) duplicated code in (Default)SolrHighlighter and HighlightingUtils

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683801#action_12683801 ] 

Shalin Shekhar Mangar commented on SOLR-952:
--------------------------------------------

bq. for the purposes of this issue does anyone see any reason not to commit the patch?

+1 for commit. I'm fine with removing the class too.

> duplicated code in (Default)SolrHighlighter and HighlightingUtils
> -----------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-952.patch
>
>
> A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.

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


[jira] Commented: (SOLR-952) duplicated code in (Default)SolrHighlighter and HighlightingUtils

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677555#action_12677555 ] 

Hoss Man commented on SOLR-952:
-------------------------------

bq. HighlightingUtils has been deprecated for at least one release; can't we just rip it out? 

it depends on how strict we want to be about backwards compatibility -- which has never been extremely well defined for Solr.  following hte Lucene-Java model, we should be back compatible with java class compatibility until 2.0 ... but since Solr tends to focus more on the HTTP API, i'm certainly fine with saying we aim for HTTP/REST back-compat between major versions, and have a more relaxed view on the class compatibility for plugin developers ... but if we really want to get into this is a much broader discussion.

for the purposes of this issue does anyone see any reason *not* to commit the patch?

> duplicated code in (Default)SolrHighlighter and HighlightingUtils
> -----------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-952.patch
>
>
> A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.

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


[jira] Commented: (SOLR-952) TokenOrderingFilter class is defined in more than one java file

Posted by "Chris Harris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662555#action_12662555 ] 

Chris Harris commented on SOLR-952:
-----------------------------------

I did a brief look through the svn logs:

 * The class started (I think) in org/apache/solr/util/SolrPluginUtils.java
 * In r510338 it was moved moved to org/apache/solr/util/HighlightingUtils.java.
 * In r639490 org/apache/solr/highlight/DefaultSolrHighlighter.java was created and the econd copy was added there; this revision did not, however, touch org/apache/solr/util/HighlightingUtils.java


> TokenOrderingFilter class is defined in more than one java file
> ---------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>
> The class TokenOrderingFilter is defined, with identical text, both in org/apache/solr/highlight/DefaultSolrHighlighter.java and org/apache/solr/util/HighlightingUtils.java. I assume this is not good, from a code maintenance perspective.
> Verified this in Solr trunk r733155.

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


[jira] Resolved: (SOLR-952) duplicated code in (Default)SolrHighlighter and HighlightingUtils

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

Hoss Man resolved SOLR-952.
---------------------------

    Resolution: Fixed
      Assignee: Hoss Man

Committed revision 758795.


> duplicated code in (Default)SolrHighlighter and HighlightingUtils
> -----------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-952.patch
>
>
> A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.

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


[jira] Updated: (SOLR-952) duplicated code in (Default)SolrHighlighter and HighlightingUtils

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

Hoss Man updated SOLR-952:
--------------------------

    Description: 

A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.

  was:
The class TokenOrderingFilter is defined, with identical text, both in org/apache/solr/highlight/DefaultSolrHighlighter.java and org/apache/solr/util/HighlightingUtils.java. I assume this is not good, from a code maintenance perspective.

Verified this in Solr trunk r733155.

        Summary: duplicated code in (Default)SolrHighlighter and HighlightingUtils  (was: TokenOrderingFilter class is defined in more than one java file)

updated summary and description to point out that TokenOrderingFilter is just a small part of the code duplication that seems to have been left behind from an incomplete refactoring of HighlightingUtils.  

> duplicated code in (Default)SolrHighlighter and HighlightingUtils
> -----------------------------------------------------------------
>
>                 Key: SOLR-952
>                 URL: https://issues.apache.org/jira/browse/SOLR-952
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>            Priority: Minor
>
> A large quantity of code is duplicated between the deprecated HighlightingUtils class and the newer SolrHighlighter and DefaultSolrHighlighter (which have been getting bug fixes and enhancements). The Utils class is no longer used anywhere in Solr, but people writing plugins may be taking advantage of it, so it should be cleaned up.

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