mirror of https://github.com/apache/lucene.git
SOLR-3542: add WeightedFragListBuilder
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1350436 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d6a8b367d2
commit
dd01aad660
|
@ -363,6 +363,9 @@ New Features
|
|||
to schema.xml's <copyField/> declaration but as an update processor that can
|
||||
be combined with other processors in any order. (Jan Høydahl & hossman)
|
||||
|
||||
* SOLR-3542: Add WeightedFragListBuilder for FVH and set it to default fragListBuilder
|
||||
in example solrconfig.xml. (Sebastian Lutze, koji)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.solr.highlight;
|
||||
|
||||
import org.apache.lucene.search.vectorhighlight.FragListBuilder;
|
||||
import org.apache.solr.common.params.SolrParams;
|
||||
|
||||
public class WeightedFragListBuilder extends HighlightingPluginBase implements
|
||||
SolrFragListBuilder {
|
||||
|
||||
@Override
|
||||
public FragListBuilder getFragListBuilder(SolrParams params) {
|
||||
// NOTE: This class (currently) makes no use of params
|
||||
// If that ever changes, it should wrap them with defaults...
|
||||
// params = SolrParams.wrapDefaults(params, defaults)
|
||||
|
||||
numRequests++;
|
||||
|
||||
return new org.apache.lucene.search.vectorhighlight.WeightedFragListBuilder();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//////////////////////// SolrInfoMBeans methods ///////////////////////
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "WeightedFragListBuilder";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSource() {
|
||||
return "$URL: http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/highlight/WeightedFragListBuilder.java $";
|
||||
}
|
||||
}
|
|
@ -1486,13 +1486,17 @@
|
|||
|
||||
<!-- Configure the standard fragListBuilder -->
|
||||
<fragListBuilder name="simple"
|
||||
default="true"
|
||||
class="solr.highlight.SimpleFragListBuilder"/>
|
||||
|
||||
<!-- Configure the single fragListBuilder -->
|
||||
<fragListBuilder name="single"
|
||||
class="solr.highlight.SingleFragListBuilder"/>
|
||||
|
||||
<!-- Configure the weighted fragListBuilder -->
|
||||
<fragListBuilder name="weighted"
|
||||
default="true"
|
||||
class="solr.highlight.WeightedFragListBuilder"/>
|
||||
|
||||
<!-- default tag FragmentsBuilder -->
|
||||
<fragmentsBuilder name="default"
|
||||
default="true"
|
||||
|
|
Loading…
Reference in New Issue