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 "Brian Whitman (JIRA)" <ji...@apache.org> on 2007/05/03 17:57:15 UTC

[jira] Created: (SOLR-225) Customize fragmenter per requesthandler in solrconfig

Customize fragmenter per requesthandler in solrconfig
-----------------------------------------------------

                 Key: SOLR-225
                 URL: https://issues.apache.org/jira/browse/SOLR-225
             Project: Solr
          Issue Type: Improvement
            Reporter: Brian Whitman


We definitely need an option to set the fragmenter class in solrconfig.

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


[jira] Commented: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509721 ] 

Ryan McKinley commented on SOLR-225:
------------------------------------


> perhaps be defined as
> 
> protected boolean emptyArray(String[] arr) {
>     return (arr == null || arr.length == 0 || 
>                  (arr.length == 1 && (arr[0] == null || arr[0].trim().length() == 0)));
> }

seems good.  This patch tried not to change any highlighting logic, it is just moved it from the existing HighlightingUtils.java

I will add this change.


> 
> +  public static final String MAX_CHARS   = PREFIX+"maxAnalyzedChars";
> 
> similarly.  Seems somewhat inelegant to define/hardcode the plugin-specific parameters here, though it is nice ot have them all in one place...
> 

I'm torn on what is more/less elegant.  

Should we have a new class in o.a.s.common.params for each plugin?  

Since the number of 'core' plugins will be relatively small, having a single HighlightParams class with sections for the core plugin options seems ok.  But I can easily be talked out of this...


> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>            Assignee: Ryan McKinley
>         Attachments: SOLR-225+260-HighlightPlugins.patch, SOLR-225+260-HighlightPlugins.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Commented: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Mike Klaas commented on SOLR-225:
---------------------------------

Looking great Ryan (again, only commenting on the Highlighting configurability parts)

should:

  protected boolean emptyArray(String[] arr) {
    return (arr == null || arr.length == 0 || arr[0] == null || arr[0].trim().length() == 0);
  }

perhaps be defined as

protected boolean emptyArray(String[] arr) {
    return (arr == null || arr.length == 0 || arr.length == 1arr[0] == null || arr[0].trim().length() == 0);
}

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>            Assignee: Ryan McKinley
>         Attachments: SOLR-225+260-HighlightPlugins.patch, SOLR-225+260-HighlightPlugins.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Commented: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Mike Klaas commented on SOLR-225:
---------------------------------

Wow, that is some honking configurability!  I've looked at the patch, but haven't tested it.

The plugin architecture seems like something tha could be made more general than just plugins.  I imagine that with very little effort, this could be used to entirely replace the *Factory.java classes that are used for Analyzer/TokenStream configuration (of course, that would relegate our nice configuration parameter names to a<lst name="defaults"> approach... perhaps the plugin archtecture could convert all unknown xml node parameters to SolrParams too?).  This is a weighty-enough topic that it should perhaps  be broken out into a separate issue.

The highlighting configurability itself is fine with me.  I think that we'll be using the lucene highlighter (or reasonable facsimile) for long enough to make it worth additional configurability.




> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Updated: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley updated SOLR-225:
-------------------------------

    Attachment: SOLR-225+260-HighlightPlugins.patch

no real changes.  added some more javadocs.  

I think this should be added to trunk soon...  

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225+260-HighlightPlugins.patch, SOLR-225+260-HighlightPlugins.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Assigned: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley reassigned SOLR-225:
----------------------------------

    Assignee: Ryan McKinley

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>            Assignee: Ryan McKinley
>         Attachments: SOLR-225+260-HighlightPlugins.patch, SOLR-225+260-HighlightPlugins.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Updated: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley updated SOLR-225:
-------------------------------

    Description: 
Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
'
For more background:
http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

  was:We definitely need an option to set the fragmenter class in solrconfig.

        Summary: Allow pluggable Highlighting classes -- Formatters and Fragmenters  (was: Customize fragmenter per requesthandler in solrconfig)

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Updated: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley updated SOLR-225:
-------------------------------

    Attachment: SOLR-225-HighlightingConfig.patch

This is a *major* rework of the highlighting architecture.  It is now configured similar to other classes.

Solrconfig.xml can define:

  <highlighting>
   <!-- Configure the standard fragmenter -->
   <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
    <lst name="defaults">
     <int name="hl.fragsize">100</int>
    </lst>
   </fragmenter>
   
   <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
    <lst name="defaults">
     <int name="hl.fragsize">70</int>
    </lst>
   </fragmenter>
   
   <!-- Configure the standard formatter -->
   <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
    <lst name="defaults">
     <str name="hl.simple.pre"><![CDATA[<em>]]></str>
     <str name="hl.simple.post"><![CDATA[</em>]]></str>
    </lst>
   </formatter>
  </highlighting>


This incorporates SOLR-102 as an optional fragmenter.

This is still quite rough...

thoughts?



> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Resolved: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley resolved SOLR-225.
--------------------------------

    Resolution: Fixed

added a while ago

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>            Assignee: Ryan McKinley
>         Attachments: SOLR-225+260-HighlightPlugins.patch, SOLR-225+260-HighlightPlugins.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Updated: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley updated SOLR-225:
-------------------------------

    Attachment: SOLR-225+260-HighlightPlugins.patch

This uses SOLR-260 general plugin loader to load highlighting plugins.

Since these patches touch a few of the same files, I will maintain them together.

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225+260-HighlightPlugins.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Updated: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley updated SOLR-225:
-------------------------------

    Attachment: SOLR-225-HighlightingConfig.patch

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Updated: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley updated SOLR-225:
-------------------------------

    Attachment: SOLR-225-HighlightingConfig.patch

no real changes... it applies cleanly with trunk.

> The plugin architecture seems like something tha could be made more general than just plugins. 

It is a 95% duplicate of the RequestHandler plugin architecture.  The only reason it could not be identical was the lazy loading request handlers...

Currently solr has two plugin initialization types: 
1. init( NamedList args )
2. init( Map<String,String> args)

If we added an interface for each initalization type, we could probably do all plugin initalization with something like the PluginLoader class in this patch

class PluginLoader<T>
{
 public Map<String,T> load( NodeList nodes ) {
   ...
 }
}




> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Commented: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

Posted by "Oz Solomon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497935 ] 

Oz Solomon commented on SOLR-225:
---------------------------------

Ryan - this is a great feature.  Any chance to see it applied to the nightly builds?

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Commented: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497955 ] 

Ryan McKinley commented on SOLR-225:
------------------------------------

After solr 1.2 is out, I hope this will get in.

This patch still needs a serious code review before considering committing it.



> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Updated: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley updated SOLR-225:
-------------------------------

    Attachment: SOLR-225-HighlightingConfig.patch

implemented with the (soon to upload) SOLR-260 PluginLoader<T>.  I'll wait till SOLR-260 is solid before updating again...

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Updated: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Ryan McKinley updated SOLR-225:
-------------------------------

    Attachment: SOLR-225-HighlightingConfig.patch

applies with trunk

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

-- 
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-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Mike Klaas edited comment on SOLR-225 at 7/2/07 4:14 PM:
---------------------------------------------------------

Looking great Ryan (again, only commenting on the Highlighting configurability parts)

should:

  protected boolean emptyArray(String[] arr) {
    return (arr == null || arr.length == 0 || arr[0] == null || arr[0].trim().length() == 0);
  }

perhaps be defined as

protected boolean emptyArray(String[] arr) {
    return (arr == null || arr.length == 0 || 
                 (arr.length == 1 && (arr[0] == null || arr[0].trim().length() == 0)));
}

Params:

+  public static final String HIGHLIGHT   = "hl";
+  public static final String PREFIX      = "hl.";
+  public static final String FIELDS      = PREFIX+"fl";
+  public static final String SNIPPETS    = PREFIX+"snippets";
+  public static final String FRAGSIZE    = PREFIX+"fragsize";
+  public static final String INCREMENT   = PREFIX+"increment";
+  public static final String SLOP        = PREFIX+"slop";

perhaps this should be PREFIX + 'regex.slop'?

+  public static final String MAX_CHARS   = PREFIX+"maxAnalyzedChars";

similarly.  Seems somewhat inelegant to define/hardcode the plugin-specific parameters here, though it is nice ot have them all in one place...




 was:
Looking great Ryan (again, only commenting on the Highlighting configurability parts)

should:

  protected boolean emptyArray(String[] arr) {
    return (arr == null || arr.length == 0 || arr[0] == null || arr[0].trim().length() == 0);
  }

perhaps be defined as

protected boolean emptyArray(String[] arr) {
    return (arr == null || arr.length == 0 || arr.length == 1arr[0] == null || arr[0].trim().length() == 0);
}

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>            Assignee: Ryan McKinley
>         Attachments: SOLR-225+260-HighlightPlugins.patch, SOLR-225+260-HighlightPlugins.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Commented: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Mike Klaas commented on SOLR-225:
---------------------------------

Yeah.  I'm happy to review the highlighting stuff (there are some parameter changes and such that would be worthwhile), but it woudl be nice to hear from yonik or hoss on the classloading/configuration stuff, and any overlap with similar-but-different existing systems in Solr.  I'm afraid I haven't had time to follow all the developments on that front.

I agree that this is a major change and there is no need to rush it for 1.2

> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>         Attachments: SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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


[jira] Commented: (SOLR-225) Allow pluggable Highlighting classes -- Formatters and Fragmenters

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

Mike Klaas commented on SOLR-225:
---------------------------------

> I'm torn on what is more/less elegant. 

> Should we have a new class in o.a.s.common.params for each plugin? 

> Since the number of 'core' plugins will be relatively small, having a single HighlightParams class with sections > for the core plugin options seems ok. But I can easily be talked out of this... 

Seems ok to me too.  Spreading everything into a jumble of classes won't exactly help coherence.



> Allow pluggable Highlighting classes -- Formatters and Fragmenters
> ------------------------------------------------------------------
>
>                 Key: SOLR-225
>                 URL: https://issues.apache.org/jira/browse/SOLR-225
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Brian Whitman
>            Assignee: Ryan McKinley
>         Attachments: SOLR-225+260-HighlightPlugins.patch, SOLR-225+260-HighlightPlugins.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch, SOLR-225-HighlightingConfig.patch
>
>
> Highlighting should support a pluggable architecture similar to what is seen with RequestHandlers, Fields, FieldTypes, etc
> '
> For more background:
> http://www.nabble.com/Custom-fragmenter-tf3681588.html#a10289335

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