From 1e037fcf507b81c1e95a2622f02e7dec7ef0903a Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Tue, 3 Jul 2007 06:14:07 +0000 Subject: [PATCH] SOLR-225 -- adding pluggable highlighting formatters and fragmenters git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@552682 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 4 + example/solr/conf/solrconfig.xml | 25 + .../solr/common/params/HighlightParams.java | 19 +- .../apache/solr/highlight/GapFragmenter.java | 106 +++++ .../highlight/HighlightingPluginBase.java | 73 +++ .../apache/solr/highlight/HtmlFormatter.java | 65 +++ .../apache/solr/highlight/SolrFormatter.java | 44 ++ .../apache/solr/highlight/SolrFragmenter.java | 44 ++ .../solr/highlight/SolrHighlighter.java | 435 ++++++++++++++++++ .../solr/highlight/HighlighterTest.java | 29 +- src/test/test-files/solr/conf/solrconfig.xml | 24 + 11 files changed, 857 insertions(+), 11 deletions(-) create mode 100644 src/java/org/apache/solr/highlight/GapFragmenter.java create mode 100644 src/java/org/apache/solr/highlight/HighlightingPluginBase.java create mode 100644 src/java/org/apache/solr/highlight/HtmlFormatter.java create mode 100644 src/java/org/apache/solr/highlight/SolrFormatter.java create mode 100644 src/java/org/apache/solr/highlight/SolrFragmenter.java create mode 100644 src/java/org/apache/solr/highlight/SolrHighlighter.java diff --git a/CHANGES.txt b/CHANGES.txt index d0e9181b57c..d0853332d02 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -87,6 +87,10 @@ New Features RequestHandlers, FieldTypes, and QueryResponseWriters to share the same base code for loading and initalizing plugins. (ryan) +14. SOLR-225: Enable pluggable highlighting classes. Allow configurable + highlighting formatters and Fragmenters. (ryan) + + Changes in runtime behavior Optimizations diff --git a/example/solr/conf/solrconfig.xml b/example/solr/conf/solrconfig.xml index b6a8c8d962b..d32eafe5512 100755 --- a/example/solr/conf/solrconfig.xml +++ b/example/solr/conf/solrconfig.xml @@ -431,6 +431,31 @@ + + + + + + 100 + + + + + + 70 + + + + + + + ]]> + ]]> + + + + + + + + 100 + + + + + + 70 + + + + + + + ]]> + ]]> + + + + +