开发者

Howto search all fields with NHibernate Search?

开发者 https://www.devze.com 2023-01-04 07:24 出处:网络
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

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

精彩评论

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

关注公众号