我正在使用 NEST,并且向 ES 索引添加内容没有任何问题。然而,获得任何结果是另一回事。
这是我的浏览器中的输出/nest-testing/_search/?pretty
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "nest-testing",
"_type" : "plain_text",
"_id" : "\\\\domain.net\\path\\to\\lorem.txt",
"_score" : 1.0, "_source" : {
"id": "\\\\domain.net\\path\\to\\lorem.txt",
"full_unc_path": "\\\\domain.net\\path\\to\\lorem.txt",
"file_name": "lorem.txt",
"parent_directory": "\\\\domain.net\\path\\to\\lorem",
"date_created": "2014-01-28T15:47:30.4302806Z",
"date_modified": "2014-01-29T15:47:30.4302806Z",
"fulltext": "Also, I like spaghetti and Meatballs.",
"original_filesize": 37,
"extracted_text_size": 37
}
} ]
}
}
这是我的 NEST 通话:
var result = client.Search(s => s
.Index(TEST_INDEX)
.MatchAll()
);
当我运行它时,我得到一个空集合。 (QueryString 搜索也不起作用。)使查询不那么具体(.AllIndices()
) 不会改变结果。
有任何想法吗?