Package org.apache.nutch.scoring.orphan
Class OrphanScoringFilter
java.lang.Object
org.apache.nutch.scoring.AbstractScoringFilter
org.apache.nutch.scoring.orphan.OrphanScoringFilter
- All Implemented Interfaces:
Configurable,Pluggable,ScoringFilter
Orphan scoring filter that determines whether a page has become orphaned,
e.g. it has no more other pages linking to it. If a page hasn't been linked
to after markGoneAfter seconds, the page is marked as gone and is then
removed by an indexer. If a page hasn't been linked to after markOrphanAfter
seconds, the page is removed from the CrawlDB.
-
Field Summary
FieldsFields inherited from interface org.apache.nutch.scoring.ScoringFilter
X_POINT_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidorphanedScore(Text url, CrawlDatum datum) This method may change the score or status of CrawlDatum during CrawlDb update, when the URL is neither fetched nor has any inlinks.voidsetConf(Configuration conf) voidupdateDbScore(Text url, CrawlDatum old, CrawlDatum datum, List<CrawlDatum> inlinks) Used for orphan control.Methods inherited from class org.apache.nutch.scoring.AbstractScoringFilter
distributeScoreToOutlinks, generatorSortValue, getConf, indexerScore, initialScore, injectedScore, passScoreAfterParsing, passScoreBeforeParsing
-
Field Details
-
ORPHAN_KEY_WRITABLE
-
-
Constructor Details
-
OrphanScoringFilter
public OrphanScoringFilter()
-
-
Method Details
-
setConf
- Specified by:
setConfin interfaceConfigurable- Overrides:
setConfin classAbstractScoringFilter
-
updateDbScore
public void updateDbScore(Text url, CrawlDatum old, CrawlDatum datum, List<CrawlDatum> inlinks) throws ScoringFilterException Used for orphan control.- Specified by:
updateDbScorein interfaceScoringFilter- Overrides:
updateDbScorein classAbstractScoringFilter- Parameters:
url- of the recordold- CrawlDatumdatum- new CrawlDatuminlinks- list of inlinked CrawlDatums- Throws:
ScoringFilterException- there is a fatal error calculating a new score ofCrawlDatumduring CrawlDb update
-
orphanedScore
Description copied from interface:ScoringFilterThis method may change the score or status of CrawlDatum during CrawlDb update, when the URL is neither fetched nor has any inlinks.- Parameters:
url- URL of the pagedatum- CrawlDatum for page
-