简体   繁体   中英

NHibernate and NHibernate Search Version Problem

I have sample application on Nhibernate with Nhibernate Search with the following version nos,

Nhibernate - v2.0.0.1001 Nhibernate Search - v2.0.0.1001

I am not sure if it custom build, but everything seems to work fine here. But as soon as I change the Nhibernate version to v2.0.1.4000 (a later minor version and build), things start breaking at,

IList result = s.CreateCriteria(typeof(DomainObject)).Add(NHibernate.Search.Search.Query("Summary:NHibernate or Name:NHibernate"))

VStudio complains "'Query' is not supported language."

Has anyone had a similar issue? How could I get a port for v2.0.1.4000?

Thanks.

I guess the way to create a lucene query was to just use the Query Parser:

QueryParser queryP = new QueryParser("id", new StandardAnalyzer());
Lucene.Net.Search.Query q = queryP.Parse("Summary:NHibernate or Name:NHibernate");
IList result = s.CreateFullTextQuery(q, typeof(DomainObject)).List();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM