NHibernate and NHibernate Search Version Problem

134 views Asked by At

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.

1

There are 1 answers

0
blacks0ul On BEST ANSWER

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();