public class LanguageIndexingFilter extends Object implements IndexingFilter
IndexingFilter
that add a
lang
(language) field to the document.
It tries to find the language of the document by:
HTMLLanguageParser
add some language
informationContent-Language
HTTP header can be
foundX_POINT_ID
Constructor and Description |
---|
LanguageIndexingFilter()
Constructs a new Language Indexing Filter.
|
Modifier and Type | Method and Description |
---|---|
NutchDocument |
filter(NutchDocument doc,
Parse parse,
Text url,
CrawlDatum datum,
Inlinks inlinks)
Adds fields or otherwise modifies the document that will be indexed for a
parse.
|
Configuration |
getConf() |
void |
setConf(Configuration conf) |
public LanguageIndexingFilter()
public NutchDocument filter(NutchDocument doc, Parse parse, Text url, CrawlDatum datum, Inlinks inlinks) throws IndexingException
IndexingFilter
filter
in interface IndexingFilter
doc
- document instance for collecting fieldsparse
- parse data instanceurl
- page urldatum
- crawl datum for the page (fetch datum from segment containing
fetch status and fetch time)inlinks
- page inlinksIndexingException
public void setConf(Configuration conf)
setConf
in interface Configurable
public Configuration getConf()
getConf
in interface Configurable
Copyright © 2015 The Apache Software Foundation