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
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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
next -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidprocessAdd(AddUpdateCommand command) voidprocessBoost(AddUpdateCommand command) voidsetEnabled(boolean enabled) Methods inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
close, doClose, finish, processCommit, processDelete, processMergeIndexes, processRollback
-
Field Details
-
INPUT_FIELD_PARAM
- See Also:
-
BOOST_FIELD_PARAM
- See Also:
-
BOOST_FILENAME_PARAM
- See Also:
-
-
Method Details
-
processAdd
- Overrides:
processAddin classUpdateRequestProcessor- Throws:
IOException
-
processBoost
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled)
-