在一个大文件中搜索

时间:2014-01-08 13:13:33

标签: c# elasticsearch

我在这个(http://norvig.com/big.txt)文件中搜索。并且搜索结果没有返回。

搜索“the”和“条款”。我没有回来任何东西。

以下是查询:

var res = client.Search<Post>(f => f.Query(q => q.Term(z => z.Content, "the")));

当我浏览索引时,我可以查看该文档,但搜索无效。

原因是什么?

1 个答案:

答案 0 :(得分:0)

如果在编制索引时未指定分析器,则使用standard - 分析器。它会移除stopwords,例如andinthe等。