我有一个问题,得到一个非常简单的ElasticLinq搜索来返回结果。问题似乎是它将一个URL发送到ElasticSearch,对于搜索URL是不正确的。以下是我已经试过:ElasticLinq似乎没有使用正确的URL
var connection = new ElasticConnection(new Uri("http://localhost:9200"), index: "mytypes");
var context = new ElasticContext(connection);
var results = (from a in context.Query<MyType>() select a).Take(10).ToArray();
当我执行最后一行,这里是我的小提琴手看到的网址:
http://localhost:9200/mytypes/mytypes/_search
这个问题似乎是mytypes在使用了两次网址而不只是一次。
我也试过不提供一个默认指数为ElasticConnection构造,在这种情况下,搜索网址如下:
http://localhost:9200/_all/mytypes/_search
在这两种情况下,我没有得到任何结果回来。如果我提交查询使用
http://localhost:9200/mytypes/_search
我得到的结果回来。
任何想法如何让ElasticLINQ使用正确的搜索URL?