List Info

Thread: Created: (SOLR-386) Add confuguration to specify SolrHighlighter implementation




Created: (SOLR-386) Add confuguration to specify SolrHighlighter implementation
country flaguser name
United States
2007-10-19 12:39:50
Add confuguration to specify SolrHighlighter implementation
-----------------------------------------------------------

                 Key: SOLR-386
                 URL: https:
//issues.apache.org/jira/browse/SOLR-386
             Project: Solr
          Issue Type: Improvement
          Components: search
    Affects Versions: 1.3
            Reporter: Eli Levine


It would be great if SolrCore allowed the highlighter class
to be configurable.  A good way would be to add a +class+
attribute to the <highlighting> element in
solrconfig.xml, similar to how the RequestHandler instance
is initialized in SorCore.

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


Commented: (SOLR-386) Add confuguration to specify SolrHighlighter implementation
country flaguser name
United States
2007-10-19 12:54:51
    [ https://issues.apache.org/jira/browse/SO
LR-386?page=com.atlassian.jira.plugin.system.issuetabpanels:
comment-tabpanel#action_12536293 ] 

Ryan McKinley commented on SOLR-386:
------------------------------------

How is this different from SOLR-225?

The example solrconfig.xml in trunk includes:


  <highlighting>
   <!-- Configure the standard fragmenter -->
   <!-- This could most likely be commented out in the
"default" case -->
   <fragmenter name="gap"
class="org.apache.solr.highlight.GapFragmenter"
default="true">
    <lst name="defaults">
     <int
name="hl.fragsize">100</int>
    </lst>
   </fragmenter>

   <!-- A regular-expression-based fragmenter (f.i., for
sentence extraction) -->
   <fragmenter name="regex"
class="org.apache.solr.highlight.RegexFragmenter"&
gt;
    <lst name="defaults">
      <!-- slightly smaller fragsizes work better because
of slop -->
      <int
name="hl.fragsize">70</int>
      <!-- allow 50% slop on fragment sizes -->
      <float
name="hl.regex.slop">0.5</float> 
      <!-- a basic sentence pattern -->
      <str name="hl.regex.pattern">[-w
,/n"']{20,200}</str>
    </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>]]&g
t;</str>
     <str
name="hl.simple.post"><![CDATA[</em>]]
></str>
    </lst>
   </formatter>
  </highlighting>


> Add confuguration to specify SolrHighlighter
implementation
>
-----------------------------------------------------------
>
>                 Key: SOLR-386
>                 URL: https:
//issues.apache.org/jira/browse/SOLR-386
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Eli Levine
>
> It would be great if SolrCore allowed the highlighter
class to be configurable.  A good way would be to add a
+class+ attribute to the <highlighting> element in
solrconfig.xml, similar to how the RequestHandler instance
is initialized in SorCore.

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


Commented: (SOLR-386) Add confuguration to specify SolrHighlighter implementation
country flaguser name
United States
2007-10-19 12:58:50
    [ https://issues.apache.org/jira/browse/SO
LR-386?page=com.atlassian.jira.plugin.system.issuetabpanels:
comment-tabpanel#action_12536295 ] 

Eli Levine commented on SOLR-386:
---------------------------------

This is different in that this request asks for the
SolrHighlighter implementation itself to be pluggable, not
just fragmenters and formatters.

> Add confuguration to specify SolrHighlighter
implementation
>
-----------------------------------------------------------
>
>                 Key: SOLR-386
>                 URL: https:
//issues.apache.org/jira/browse/SOLR-386
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Eli Levine
>
> It would be great if SolrCore allowed the highlighter
class to be configurable.  A good way would be to add a
+class+ attribute to the <highlighting> element in
solrconfig.xml, similar to how the RequestHandler instance
is initialized in SorCore.

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


Commented: (SOLR-386) Add confuguration to specify SolrHighlighter implementation
country flaguser name
United States
2007-10-19 13:10:50
    [ https://issues.apache.org/jira/browse/SO
LR-386?page=com.atlassian.jira.plugin.system.issuetabpanels:
comment-tabpanel#action_12536302 ] 

Mike Klaas commented on SOLR-386:
---------------------------------

I suppose the real question is What behaviour are you trying
to achieve by ripping out the whole highlighter
implementation?  If you have custom code that does something
completely different, it is probably easier to just call
that code manually from your own request handler.

> Add confuguration to specify SolrHighlighter
implementation
>
-----------------------------------------------------------
>
>                 Key: SOLR-386
>                 URL: https:
//issues.apache.org/jira/browse/SOLR-386
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Eli Levine
>
> It would be great if SolrCore allowed the highlighter
class to be configurable.  A good way would be to add a
+class+ attribute to the <highlighting> element in
solrconfig.xml, similar to how the RequestHandler instance
is initialized in SorCore.

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


Commented: (SOLR-386) Add confuguration to specify SolrHighlighter implementation
country flaguser name
United States
2007-10-19 16:31:50
    [ https://issues.apache.org/jira/browse/SO
LR-386?page=com.atlassian.jira.plugin.system.issuetabpanels:
comment-tabpanel#action_12536348 ] 

Eli Levine commented on SOLR-386:
---------------------------------

This would be useful for projects with non-standard
highlighting needs.  In our case, under certain
circumstances we need to run a field through the highlighter
multiple times using different fragmenters if previous runs
did not produce any highlighted fragments.  Also, this would
allow us to use SpanScorer for phrase highlighting, as it is
instantiated differently from other scorers (needs
CachingTokenFilter, etc.)

Since the Solr highlighter is a plug-in, it seems natural to
allow different implementations to be used, similar to
what's allowed for request and update handlers and other
configurable parts of SolrCore.

Thanks,

Eli


> Add confuguration to specify SolrHighlighter
implementation
>
-----------------------------------------------------------
>
>                 Key: SOLR-386
>                 URL: https:
//issues.apache.org/jira/browse/SOLR-386
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Eli Levine
>
> It would be great if SolrCore allowed the highlighter
class to be configurable.  A good way would be to add a
+class+ attribute to the <highlighting> element in
solrconfig.xml, similar to how the RequestHandler instance
is initialized in SorCore.

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


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )