public class OPICScoringFilter extends java.lang.Object implements ScoringFilter
X_POINT_ID| Constructor and Description |
|---|
OPICScoringFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
distributeScoreToOutlinks(java.lang.String fromUrl,
WebPage row,
java.util.Collection<ScoreDatum> scoreData,
int allCount)
Get cash on hand, divide it by the number of outlinks and apply.
|
float |
generatorSortValue(java.lang.String url,
WebPage row,
float initSort)
Use
WebPage.getScore(). |
Configuration |
getConf() |
java.util.Collection<WebPage.Field> |
getFields() |
float |
indexerScore(java.lang.String url,
NutchDocument doc,
WebPage row,
float initScore)
Dampen the boost value by scorePower.
|
void |
initialScore(java.lang.String url,
WebPage row)
Set to 0.0f (unknown value) - inlink contributions will bring it to a
correct level.
|
void |
injectedScore(java.lang.String url,
WebPage row)
Set an initial score for newly injected pages.
|
void |
setConf(Configuration conf) |
void |
updateScore(java.lang.String url,
WebPage row,
java.util.List<ScoreDatum> inlinkedScoreData)
Increase the score by a sum of inlinked scores.
|
public Configuration getConf()
getConf in interface Configurablepublic void setConf(Configuration conf)
setConf in interface Configurablepublic void injectedScore(java.lang.String url,
WebPage row)
throws ScoringFilterException
ScoringFilterinjectedScore in interface ScoringFilterurl - url of the pagerow - new page. Filters will modify it in-place.ScoringFilterExceptionpublic void initialScore(java.lang.String url,
WebPage row)
throws ScoringFilterException
initialScore in interface ScoringFilterurl - url of the pageScoringFilterExceptionpublic float generatorSortValue(java.lang.String url,
WebPage row,
float initSort)
throws ScoringFilterException
WebPage.getScore().generatorSortValue in interface ScoringFilterurl - url of the pagerow - WebPage object relative to the URLinitSort - initial sort value, or a value from previous filters in chainScoringFilterExceptionpublic void updateScore(java.lang.String url,
WebPage row,
java.util.List<ScoreDatum> inlinkedScoreData)
updateScore in interface ScoringFilterurl - url of the pagerow - WebPage object relative to the URLinlinkedScoreData - list of ScoreDatums for all inlinks pointing to
this URL.public void distributeScoreToOutlinks(java.lang.String fromUrl,
WebPage row,
java.util.Collection<ScoreDatum> scoreData,
int allCount)
distributeScoreToOutlinks in interface ScoringFilterfromUrl - url of the source pagescoreData - A list of ScoreDatumallCount - number of all collected outlinks from the source pagepublic float indexerScore(java.lang.String url,
NutchDocument doc,
WebPage row,
float initScore)
indexerScore in interface ScoringFilterurl - url of the pagedoc - document. NOTE: this already contains all information collected by
indexing filters. Implementations may modify this instance, in
order to store/remove some information.initScore - initial boost value for the Lucene document.public java.util.Collection<WebPage.Field> getFields()
getFields in interface FieldPluggableCopyright © 2019 The Apache Software Foundation