将元标记捕获到索引中的正确 Stormcrawler 设置是什么?
What is the proper Stormcrawler settings to capture a meta tag into an index?
更新:我明白了。看到底部...但如果我遗漏任何内容,请随时纠正我...
crawler-conf.yaml
(以及其他地方,如果需要)对于来自以下 meta-tag 的信息的正确设置是什么:
<meta name="college" content="artdesign"/>
要正确捕获到字段名称为 'college' 或 'seed' 的索引中?
我看到可能需要设置以下设置,但尝试了各种变体,但似乎没有捕获到数据。
在crawler-conf.yaml
中:
# lists the metadata to persist to storage
# these are not transfered to the outlinks
metadata.persist:
- _redirTo
- error.cause
- error.source
- isSitemap
- isFeed
- college
- seed
不确定 'persists to storage' 是否意味着进入索引?
crawler-conf.yaml
中的另一个选项是:
# configuration for the classes extending AbstractIndexerBolt
indexer.md.mapping:
- parse.title=title
- parse.keywords=keywords
- parse.description=description
- domain=domain
- college=college
- college=seed
我之前曾询问过 'seed' 的某些值似乎传播到没有元标记的已提取文档这一事实。该设置是:
# metadata to transfer to the outlinks
# used by Fetcher for redirections, sitemapparser, etc...
# these are also persisted for the parent document (see below)
# metadata.transfer:
# - seed
因此,正如标题中所问,我的问题是如何在 crawler-conf.yaml
(或任何其他配置)中配置这些选项,以可靠地从列在本页面顶部的元标记中捕获数据问题,而不将其传播到没有该元标记的获取文档?
这是我整理的。上面引用的代码中 'parse.title' 中引用的 'parse' 是对顶部 [=26 下的自定义条目的引用(编辑:元标记的键,然后由其检索) =] 在 src/main/resources/parsefilters.json
文件中。我进去并添加了一个
"parse.college": "//META[@name=\"college\"]/@content"
在那些已经存在但仍在顶部的下方的行 class。
然后我将 indexer.md.mapping
下对学院的引用更改为阅读 - parse.college=college
并重建爬虫和 运行 它。然后它开始正确地抓取 <meta name="college" content="artdesign"/>
标签并将其发送到索引中的 college
字段。
更新:我明白了。看到底部...但如果我遗漏任何内容,请随时纠正我...
crawler-conf.yaml
(以及其他地方,如果需要)对于来自以下 meta-tag 的信息的正确设置是什么:
<meta name="college" content="artdesign"/>
要正确捕获到字段名称为 'college' 或 'seed' 的索引中?
我看到可能需要设置以下设置,但尝试了各种变体,但似乎没有捕获到数据。
在crawler-conf.yaml
中:
# lists the metadata to persist to storage
# these are not transfered to the outlinks
metadata.persist:
- _redirTo
- error.cause
- error.source
- isSitemap
- isFeed
- college
- seed
不确定 'persists to storage' 是否意味着进入索引?
crawler-conf.yaml
中的另一个选项是:
# configuration for the classes extending AbstractIndexerBolt
indexer.md.mapping:
- parse.title=title
- parse.keywords=keywords
- parse.description=description
- domain=domain
- college=college
- college=seed
我之前曾询问过 'seed' 的某些值似乎传播到没有元标记的已提取文档这一事实。该设置是:
# metadata to transfer to the outlinks
# used by Fetcher for redirections, sitemapparser, etc...
# these are also persisted for the parent document (see below)
# metadata.transfer:
# - seed
因此,正如标题中所问,我的问题是如何在 crawler-conf.yaml
(或任何其他配置)中配置这些选项,以可靠地从列在本页面顶部的元标记中捕获数据问题,而不将其传播到没有该元标记的获取文档?
这是我整理的。上面引用的代码中 'parse.title' 中引用的 'parse' 是对顶部 [=26 下的自定义条目的引用(编辑:元标记的键,然后由其检索) =] 在 src/main/resources/parsefilters.json
文件中。我进去并添加了一个
"parse.college": "//META[@name=\"college\"]/@content"
在那些已经存在但仍在顶部的下方的行 class。
然后我将 indexer.md.mapping
下对学院的引用更改为阅读 - parse.college=college
并重建爬虫和 运行 它。然后它开始正确地抓取 <meta name="college" content="artdesign"/>
标签并将其发送到索引中的 college
字段。