开发者

Howto search all fields with NHibernate Search?

NHibernate is working fine in my current solution but I would like to do queries that search all fields. How can I do something like

.CreateFullTextQuery<MyObje开发者_运维百科ctGraph>("*", queryText)
.CreateFullTextQuery<MyObjectGraph>("%", queryText)
.CreateFullTextQuery<MyObjectGraph>("*:test")
.CreateFullTextQuery<MyObjectGraph>("%:test")

I tried the above but these do not work. I search for quite some time but cannot find a way to do this.


You have to write:

.CreateFullTextQuery<MyObjectGraph>("Field:{0}", criteria);

For example:

.CreateFullTextQuery<MyObjectGraph>("Name:{0}", "Ramon");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜