设置地理网络

注解

geonwork包应该使用Maven构建 es 配置文件以便能够将搜索/内容统计信息配置为使用ElasticSearch/Kibana:

$ cd GN_SOURCES/
$ mvn clean install -Penv-prod,es

如果您使用的是开发环境,可以使用Geonetwork sources文件夹中的以下命令:

$ cd GN_SOURCES/web
$ mvn jetty:run -Penv-dev,es

要在GeoNetwork中设置搜索/内容统计信息,请执行以下步骤:

  • 在中注释以下筛选器 TOMCAT_DIR/webapps/geonetwork/WEB-INF/web.xml

<!--<filter-mapping>
  <filter-name>XFrameOptionsFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>-->

,否则访问仪表板时,js控制台中将显示以下错误:

Refused to display 'http://localhost:8080/geonetwork/dashboards/app/kibana#/dashboard/5b407790-4fa1-11e7-a577-3197d1592a1d?embed=true&_g=()' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'".
  • 启动GeoNetwork。

  • 以身份登录 administrator 使用并加载模板(http://localhost/本地主机:8080/地理网络/srv/eng/管理控制台/元数据).

  • 创建一些元数据记录(也可以加载示例)。

  • 在“设置”页中启用搜索统计信息(http://localhost/本地主机:8080/地理网络/srv/eng/管理控制台/设置).

../../_images/search-statistics.png
  • 在GeoNetwork中进行一些搜索。

  • Statistics and status 在http://localhost/本地主机:8080/地理网络/srv/eng/管理控制台/仪表板然后选择“搜索统计”。

第一次提示您选择Kibana默认索引时。选择 .dashboards

../../_images/kibana-index-1.png

并设置为默认值以使其正常工作。

../../_images/kibana-index-2.png
  • 重新加载页面并检查仪表板。

../../_images/search-statistics-dashboards.png

内容统计/验证

内容和验证状态统计信息也从到提供 Statistics and status 在http://localhost/本地主机:8080/地理网络/srv/eng/管理控制台/仪表板,但需要在ElasticSearch中手动索引内容。这将在未来的版本中得到改进。

  • 要在ElasticSearch中索引内容和验证状态,请转到http://localhost/本地主机:8080/地理网络/srv/eng/管理控制台/工具并选择以下选项:

../../_images/content-indexing.png
  • 访问 Content StatisticsValidation 在里面 Statistics and status (http://localhost/本地主机:8080/地理网络/srv/eng/管理控制台/仪表板)