gpt4 book ai didi

elasticsearch - 如何查看被索引的分析数据?

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

您如何查看索引后存储的分析数据。

我知道您可以进行搜索以查看此内容

http://localhost:9200/local_products_fr/fields/_search/

但是我想看到的是实际数据而不是_source

类似于调用_analyzer时得到的内容
http://localhost:9200/local_products_fr/_analyze?text=<p>my <b>super</b> text</p>&analyzer=analyzer_fr

{
"tokens": [
{
"token": "my",
"start_offset": 3,
"end_offset": 5,
"type": "<ALPHANUM>",
"position": 0
},
{
"token": "b",
"start_offset": 7,
"end_offset": 8,
"type": "<ALPHANUM>",
"position": 1
},
{
"token": "sup",
"start_offset": 9,
"end_offset": 14,
"type": "<ALPHANUM>",
"position": 2
},
{
"token": "b",
"start_offset": 16,
"end_offset": 17,
"type": "<ALPHANUM>",
"position": 3
},
{
"token": "text",
"start_offset": 19,
"end_offset": 23,
"type": "<ALPHANUM>",
"position": 4
}
]
}

最佳答案

我用它来获取每个文档的字段的倒排索引

{
"query": {
"bool": {
"must": [{
"term": {
"_id": {
"value": "2"
}
}
}]
}
},
"script_fields": {
"terms": {
"script": "doc['product.name'].values"
}
}
}

希望这对你有用

关于elasticsearch - 如何查看被索引的分析数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43415139/

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