public class LinkAnalysisScoringFilter extends Object implements ScoringFilter
X_POINT_ID
Constructor and Description |
---|
LinkAnalysisScoringFilter() |
Modifier and Type | Method and Description |
---|---|
void |
distributeScoreToOutlinks(String fromUrl,
WebPage page,
Collection<ScoreDatum> scoreData,
int allCount)
Distribute score value from the current page to all its outlinked pages.
|
float |
generatorSortValue(String url,
WebPage page,
float initSort)
This method prepares a sort value for the purpose of sorting and selecting
top N scoring pages during fetchlist generation.
|
Configuration |
getConf() |
Collection<WebPage.Field> |
getFields() |
float |
indexerScore(String url,
NutchDocument doc,
WebPage page,
float initScore)
This method calculates a Lucene document boost.
|
void |
initialScore(String url,
WebPage page)
Set an initial score for newly discovered pages.
|
void |
injectedScore(String url,
WebPage page)
Set an initial score for newly injected pages.
|
void |
setConf(Configuration conf) |
void |
updateScore(String url,
WebPage page,
List<ScoreDatum> inlinkedScoreData)
This method calculates a new score during table update, based on the values
contributed by inlinked pages.
|
public Configuration getConf()
getConf
in interface Configurable
public void setConf(Configuration conf)
setConf
in interface Configurable
public Collection<WebPage.Field> getFields()
getFields
in interface FieldPluggable
public void injectedScore(String url, WebPage page) throws ScoringFilterException
ScoringFilter
injectedScore
in interface ScoringFilter
url
- url of the pagepage
- new page. Filters will modify it in-place.ScoringFilterException
public void initialScore(String url, WebPage page) throws ScoringFilterException
ScoringFilter
initialScore
in interface ScoringFilter
url
- url of the pageScoringFilterException
public float generatorSortValue(String url, WebPage page, float initSort) throws ScoringFilterException
ScoringFilter
generatorSortValue
in interface ScoringFilter
url
- url of the pageinitSort
- initial sort value, or a value from previous filters in chainScoringFilterException
public void distributeScoreToOutlinks(String fromUrl, WebPage page, Collection<ScoreDatum> scoreData, int allCount) throws ScoringFilterException
ScoringFilter
distributeScoreToOutlinks
in interface ScoringFilter
fromUrl
- url of the source pagescoreData
- A list of OutlinkedScoreDatum
s for every outlink. These
OutlinkedScoreDatum
s will be passed to
#updateScore(String, OldWebTableRow, List)
for every
outlinked URL.allCount
- number of all collected outlinks from the source pageScoringFilterException
public void updateScore(String url, WebPage page, List<ScoreDatum> inlinkedScoreData) throws ScoringFilterException
ScoringFilter
updateScore
in interface ScoringFilter
url
- url of the pageScoringFilterException
public float indexerScore(String url, NutchDocument doc, WebPage page, float initScore) throws ScoringFilterException
ScoringFilter
indexerScore
in interface ScoringFilter
url
- 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.ScoringFilterException
Copyright © 2015 The Apache Software Foundation