使用NEST针对某些索引模式搜索多个索引

问题描述 投票:0回答:1

我搜索了NEST文档,但似乎无法找到合适的答案。我的问题是如何使用NEST针对某些索引模式搜索多个索引?例如

如果我在Elasticsearch DB中有以下名称的索引

media-2017-10, media-2018-03, media-2018-04

为了指定我选择的索引,我需要使用外卡字符*,如下所示:

client.Search<Media>(s => s
   .Index("media-*")
   . query goes here .....

在NEST有可能吗?

elasticsearch search wildcard nest elasticsearch-indices
1个回答
0
投票

是的,这很有效。试试吧 :)

.Index(...)接受通配符索引

© www.soinside.com 2019 - 2024. All rights reserved.