gpt4 book ai didi

elasticsearch - elasticsearch 6无法安装插件org.wikimedia.search:extra不兼容

转载 作者:行者123 更新时间:2023-12-03 00:53:09 26 4
gpt4 key购买 nike

我已经在docker上安装了 flex 搜索版本6.2.3。

尝试安装以下elasticsearch插件时遇到以下错误

org.wikimedia.search:extra



线程“主”中的异常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

我正在尝试安装此插件以将Wikipedia词典加载到elasticsearch中,但该插件的最新版本为5.5.2。

最佳答案

两年前,维基媒体提供了生产 flex 搜索索引的转储。因此,将维基百科(也是维基百科)加载到 flex 中非常简单

索引每周导出一次,每个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'

    请享用!

    关于elasticsearch - elasticsearch 6无法安装插件org.wikimedia.search:extra不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49917152/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com