elasticsearch 6 无法安装插件 org.wikimedia.search:extra 不兼容
elasticsearch 6 unable to install plugin org.wikimedia.search:extra not compatible
我已经在 docker 上安装了 elastic search 版本 6.2.3。
我在尝试安装以下 elasticsearch 插件时遇到以下错误
org.wikimedia.search:extra
线程"main"中出现异常java.lang.IllegalArgumentException:插件[extra]与版本[6.2.3]不兼容;专为版本 [5.5.2]
而设计
我尝试使用以下命令安装插件:
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install org.wikimedia.search:extra:5.5.2.3
我试图安装此插件以将维基百科词典加载到 elasticsearch 中,但该插件的最新版本是 5.5.2
两年前,维基媒体提供了生产弹性搜索索引的可用转储。因此,将维基百科(也是维基词典)加载到弹性现在非常简单
索引每周导出一次,每个 wiki 有两次导出。
The content index, which contains only article pages, called content;
The general index, containing all pages. This includes talk pages, templates, etc, called general;
你可以在这里找到它们http://dumps.wikimedia.org/other/cirrussearch/current/
根据需要创建映射。例如:
{
"mappings": {
"page": {
"properties": {
"auxiliary_text": {
"type": "text"
},
"category": {
"type": "text"
},
"coordinates": {
"properties": {
"coord": {
"properties": {
"lat": {
"type": "double"
},
"lon": {
"type": "double"
}
}
},
"country": {
"type": "text"
},
"dim": {
"type": "long"
},
"globe": {
"type": "text"
},
"name": {
"type": "text"
},
"primary": {
"type": "boolean"
},
"region": {
"type": "text"
},
"type": {
"type": "text"
}
}
},
"defaultsort": {
"type": "boolean"
},
"external_link": {
"type": "text"
},
"heading": {
"type": "text"
},
"incoming_links": {
"type": "long"
},
"language": {
"type": "text"
},
"namespace": {
"type": "long"
},
"namespace_text": {
"type": "text"
},
"opening_text": {
"type": "text"
},
"outgoing_link": {
"type": "text"
},
"popularity_score": {
"type": "double"
},
"redirect": {
"properties": {
"namespace": {
"type": "long"
},
"title": {
"type": "text"
}
}
},
"score": {
"type": "double"
},
"source_text": {
"type": "text"
},
"template": {
"type": "text"
},
"text": {
"type": "text"
},
"text_bytes": {
"type": "long"
},
"timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"title": {
"type": "text"
},
"version": {
"type": "long"
},
"version_type": {
"type": "text"
},
"wiki": {
"type": "text"
},
"wikibase_item": {
"type": "text"
}
}
}
}
}
创建索引后,只需键入:
zcat enwiki-current-cirrussearch-general.json.gz | parallel --pipe -L 2 -N 2000 -j3 'curl -s http://localhost:9200/enwiki/_bulk --data-binary @- > /dev/null'
尽情享受吧!
我已经在 docker 上安装了 elastic search 版本 6.2.3。
我在尝试安装以下 elasticsearch 插件时遇到以下错误
org.wikimedia.search:extra
线程"main"中出现异常java.lang.IllegalArgumentException:插件[extra]与版本[6.2.3]不兼容;专为版本 [5.5.2]
而设计我尝试使用以下命令安装插件:
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install org.wikimedia.search:extra:5.5.2.3
我试图安装此插件以将维基百科词典加载到 elasticsearch 中,但该插件的最新版本是 5.5.2
两年前,维基媒体提供了生产弹性搜索索引的可用转储。因此,将维基百科(也是维基词典)加载到弹性现在非常简单
索引每周导出一次,每个 wiki 有两次导出。
The content index, which contains only article pages, called content;
The general index, containing all pages. This includes talk pages, templates, etc, called general;
你可以在这里找到它们http://dumps.wikimedia.org/other/cirrussearch/current/
根据需要创建映射。例如:
{ "mappings": { "page": { "properties": { "auxiliary_text": { "type": "text" }, "category": { "type": "text" }, "coordinates": { "properties": { "coord": { "properties": { "lat": { "type": "double" }, "lon": { "type": "double" } } }, "country": { "type": "text" }, "dim": { "type": "long" }, "globe": { "type": "text" }, "name": { "type": "text" }, "primary": { "type": "boolean" }, "region": { "type": "text" }, "type": { "type": "text" } } }, "defaultsort": { "type": "boolean" }, "external_link": { "type": "text" }, "heading": { "type": "text" }, "incoming_links": { "type": "long" }, "language": { "type": "text" }, "namespace": { "type": "long" }, "namespace_text": { "type": "text" }, "opening_text": { "type": "text" }, "outgoing_link": { "type": "text" }, "popularity_score": { "type": "double" }, "redirect": { "properties": { "namespace": { "type": "long" }, "title": { "type": "text" } } }, "score": { "type": "double" }, "source_text": { "type": "text" }, "template": { "type": "text" }, "text": { "type": "text" }, "text_bytes": { "type": "long" }, "timestamp": { "type": "date", "format": "strict_date_optional_time||epoch_millis" }, "title": { "type": "text" }, "version": { "type": "long" }, "version_type": { "type": "text" }, "wiki": { "type": "text" }, "wikibase_item": { "type": "text" } } } } }
创建索引后,只需键入:
zcat enwiki-current-cirrussearch-general.json.gz | parallel --pipe -L 2 -N 2000 -j3 'curl -s http://localhost:9200/enwiki/_bulk --data-binary @- > /dev/null'
尽情享受吧!