gpt4 book ai didi

c# - Elasticsearch/Nest-使用MultiMatch TextQueryType.Phrase和通配符

转载 作者:行者123 更新时间:2023-12-03 02:04:22 25 4
gpt4 key购买 nike

关于这个问题:
Elasticsearch/Nest - using MatchPhrase with OnFieldsWithBoost

我想知道是否有可能扩展该问题的解决方案,以使 Elasticsearch 搜索与“太阳照耀”相匹配的所有内容,并获得“太阳照耀”之类的结果。我当时在想类似搜索查询“The sun is shin *”之类的方法,但这似乎不起作用。

最佳答案

使用另一个TextQueryType值:PhrasePrefix

您的多匹配查询的类型为短语前缀,并且ElasticSearch将搜索从查询短语的最后一个词开始的索引词(在文档中更多信息here about match_phrase_prefix)。

但是,多重匹配查询不支持通配符(在问题的标题中提到),例如*?

关于c# - Elasticsearch/Nest-使用MultiMatch TextQueryType.Phrase和通配符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28173569/

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