org.apache.solr.update.processor
Class RegexpBoostProcessor
java.lang.Object
org.apache.solr.update.processor.UpdateRequestProcessor
org.apache.solr.update.processor.RegexpBoostProcessor
public class RegexpBoostProcessor
- extends UpdateRequestProcessor
A processor which will match content of "inputField" against regular expressions
found in "boostFilename", and if it matches will return the corresponding boost
value from the file and output this to "boostField" as a double value.
If more than one pattern matches, the boosts from each are multiplied.
A typical use case may be to match a URL against patterns to boost or deboost
web documents based on the URL itself:
# Format of each line: <pattern><TAB><boost>
# Example:
https?://my.domain.com/temp.* 0.2
Both inputField, boostField and boostFilename are mandatory parameters.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INPUT_FIELD_PARAM
protected static final String INPUT_FIELD_PARAM
- See Also:
- Constant Field Values
BOOST_FIELD_PARAM
protected static final String BOOST_FIELD_PARAM
- See Also:
- Constant Field Values
BOOST_FILENAME_PARAM
protected static final String BOOST_FILENAME_PARAM
- See Also:
- Constant Field Values
processAdd
public void processAdd(AddUpdateCommand command)
throws IOException
- Overrides:
processAdd
in class UpdateRequestProcessor
- Throws:
IOException
processBoost
public void processBoost(AddUpdateCommand command)
isEnabled
public boolean isEnabled()
setEnabled
public void setEnabled(boolean enabled)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.