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");
精彩评论