Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.11
-
None
-
None
Description
Generator should support Jexl expressions. This would make it much easier to implement focussing crawlers that rely on information stored in the CrawlDB. With the HostDB it is possible to restrict the generator to select only interesting records but it is very cumbersome and involves domainblacklist-urlfiltering.
With Jexl support, it is no hassle!
Crawl only english records:
bin/nutch generate crawl/crawldb/ crawl/segments/ -expr "(lang == 'en'')"
Crawl only HTML records:
bin/nutch generate crawl/crawldb/ crawl/segments/ -expr "(Content_Type == 'text/html' || Content_Type == 'application/xhtml+xml')"
Keep in mind:
- Jexl doesn't allow a hyphen/minus in field identifier, they are transformed to underscores
- string literals must be in quotes, only surrounding qoute needs to be escaped by backslash
Attachments
Attachments
Issue Links
- supercedes
-
NUTCH-1179 Option to restrict generated records by metadata
- Closed
-
NUTCH-2215 Generator to restrict crawl to mime type
- Closed