【问题标题】:Can elasticsearch percolator give word position?elasticsearch percolator 可以给出单词位置吗?
【发布时间】:2021-08-27 17:58:20
【问题描述】:

我知道弹性搜索中有词向量,可以给出词的位置和其他统计信息。

percolator 能否给出正在搜索的文档中的单词位置? 我知道这些文档没有被索引,只有过滤器查询被索引。我看到下面

If the requested information wasn’t stored in the index, it will be computed on the fly if possible. Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.

在 - https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html 很想知道弹性搜索是否可以即时计算单词位置?

感谢任何潜在客户。感谢阅读。

【问题讨论】:

    标签: elasticsearch


    【解决方案1】:

    @Kaveh

    感谢您抽出宝贵时间,但很抱歉,我不明白这 (https://stackoverflow.com/a/67926555/4068218) 有何关联,因为使用人工文档我可以获得统计信息 - https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-termvectors.html 但我有的是渗滤器 - https://www.youtube.com/watch?v=G2Ru2KV0DZg

    因此,即使我使用人工文档或通过 /_analyze 获得术语向量也没有关系,因为它们不会给我术语的位置(在过滤器中)

    例如 Percolator - 我正在寻找这个词 - 你好。 我的文档具有以下字段和值 “文本”:“你好世界”

    如果我使用人工文档或 /_analyze,它会说 0 - Hello 1- World 但是当我渗透时,我会得到 找到单词 Hello 的渗透查询。我想把两者结合起来,让渗滤器告诉我 “我在位置 0 找到了你好”

    【讨论】:

      【解决方案2】:

      正如您在术语向量的文档中看到的,如果您存储 _source,Elastic 可以即时计算术语向量。它将根据来源分析您的文本,并将其与现有的索引术语向量聚合。 如果您想获得术语的结果,您始终可以获取术语列表的分析数据以获取更多信息here

      【讨论】:

      • 我看到荧光笔的类型是统一的、普通的和 fvh,但我看不出这些与我关于渗透的问题有什么关系?看起来对于 fvh 荧光笔,它需要在索引时指定“term_vector”:“with_positions_offsets”,但在 percolator 中我根本不索引文档。那么这有什么关系呢?
      • 抱歉给您带来不便,请查看我更新的答案。
      猜你喜欢
      • 1970-01-01
      • 2015-09-26
      • 2015-01-10
      • 2023-04-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多