public class TestEntity
{
public int ID { get; set; }
public int RootID { get; set; }
public string Path { get; set; }
public string Name { get; set; }
public string[] Tags { get; set; }
}
如何搜索这个Tags 呢, 精确搜索该怎么做?目前我只能这样搜索,但是这样不对,如何指定字段呢?
var request = new SearchRequest<TestEntity>
{
From = 0
,
Size = 10
,
Query = new QueryStringQuery { Query = "\"使命召唤1\"" }
};
var results = client.Search<TestEntity>(request);
var docs = results.Documents;
foreach (var item in docs)
{
Response.Write(":" + item.Name + "\r\n");
}
2 个回复
jerryhouse - 搜索工程师,技术网站:www.dcharm.com
赞同来自:
martindu - 搜披露创始人
赞同来自:
另外你是用的c#的NEST接口吧,这里不容易见到,有问题可随时联系我。