Package org.apache.solr.update.processor
Class RegexpBoostProcessor
- java.lang.Object
-
- org.apache.solr.update.processor.UpdateRequestProcessor
-
- org.apache.solr.update.processor.RegexpBoostProcessor
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
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.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
BOOST_FIELD_PARAM
protected static String
BOOST_FILENAME_PARAM
protected static String
INPUT_FIELD_PARAM
-
Fields inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
next
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEnabled()
void
processAdd(AddUpdateCommand command)
void
processBoost(AddUpdateCommand command)
void
setEnabled(boolean enabled)
-
Methods inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
close, doClose, finish, processCommit, processDelete, processMergeIndexes, processRollback
-
-
-
-
Field Detail
-
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
-
-
Method Detail
-
processAdd
public void processAdd(AddUpdateCommand command) throws IOException
- Overrides:
processAdd
in classUpdateRequestProcessor
- Throws:
IOException
-
processBoost
public void processBoost(AddUpdateCommand command)
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
-