elasticsearch - elasticsearch 7xx exceptions.RequestError
问题描述
请帮我解决elasticsearch的问题。安装此软件包https://github.com/nyaadevs/nyaa后,使用 elasticsearch 的搜索不起作用。config.yml 是为旧版本的 elasticsearch < 6 创建的。现在的弹性版本是最新的(7xx)。
配置.yml
settings:
analysis:
analyzer:
my_search_analyzer:
type: custom
tokenizer: standard
char_filter:
- my_char_filter
filter:
- lowercase
my_index_analyzer:
type: custom
tokenizer: standard
char_filter:
- my_char_filter
filter:
- resolution
- lowercase
- word_delimit
- my_ngram
- trim_zero
- unique
# For exact matching - separate each character for substring matching + lowercase
exact_analyzer:
tokenizer: exact_tokenizer
filter:
- lowercase
# For matching full words longer than the ngram limit (15 chars)
my_fullword_index_analyzer:
type: custom
tokenizer: standard
char_filter:
- my_char_filter
filter:
- lowercase
- word_delimit
# Skip tokens shorter than N characters,
# since they're already indexed in the main field
- fullword_min
- unique
tokenizer:
# Splits input into characters, for exact substring matching
exact_tokenizer:
type: pattern
pattern: "(.)"
group: 1
filter:
my_ngram:
type: edgeNGram
min_gram: 1
max_gram: 15
fullword_min:
type: length
# Remember to change this if you change the max_gram below!
min: 16
resolution:
type: pattern_capture
patterns: ["(\\d+)[xX](\\d+)"]
trim_zero:
type: pattern_capture
patterns: ["0*([0-9]*)"]
word_delimit:
type: word_delimiter
preserve_original: true
split_on_numerics: false
char_filter:
my_char_filter:
type: mapping
mappings: ["-=>_", "!=>_", "_=>\\u0020"]
index:
id_field: integer
sort.order: desc
# we're running a single es node, so no sharding necessary,
# plus replicas don't really help either.
number_of_shards: 1
number_of_replicas : 0
# since we disabled the _all field, default query the
# name of the torrent.
query:
default_field: display_name
mappings:
properties:
title:
type: text
boost: 2
content:
type: text
id:
type: integer
看起来您的帖子主要是代码;请添加更多详细信息。看起来您的帖子主要是代码;请添加更多详细信息。看起来您的帖子主要是代码;请添加更多细节。
解决方案
不熟悉 w/nyaa,但id_field: integer
看起来很可疑。
不应该id_field: id
吗?
推荐阅读
- wordpress - 目录未显示在 wordpress 和帖子的自定义中
- mysql - 如果第 2 列缺少一个匹配项,尽管有其他匹配项,则返回第 1 列
- java - 从 Apache CXF 使用 WCF 服务
- c++ - 如何在 Unreal Engiene 4.26 C++ 中使用“UWidgetLayoutLibrary::GetMousePositionOnViewport(...)”?
- javascript - 制作一个活跃的元素并使其余的不活跃
- android - 音频文件无法使用 AssetFileDescriptor 正常工作
- google-bigquery - 大查询过滤掉数字
- python - type.TypeVar 中的参数“绑定”是什么意思?
- java - Serenity Junit - 如何通过 mvn 命令使用 serenity 执行指定的单个测试
- types - 无需包装即可轻松实现此“Magma”特征