You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to load an NHibernate entity from a DB, push it to an OpenSearch node for indexing, and then query OpenSearch using C# expressions.
Is that possible, and are there any examples for that (mainly the OpenSearch part)?
I was looking at the tests and I was hoping it would be something like this, but there is an apparent problem: I have not specified the OpenSearch Url anywhere (nhSession is the session towards the DB):
IFullTextSession s = Search.CreateFullTextSession(nhSession); // nhSession is the session towards the DB.
using (ITransaction tx = s.BeginTransaction())
{
s.Save(doc);
tx.Commit();
var res = s.Query<Document>()
.Where(f => f.CreatedDate > DateTime.Parse("2023-08-01"))
.ToArray();
}
Is it possible to get an ISession that points to an OpenSearch node or cluster, instead of a relational DB?
It would be nice to have some sample code in the README page.
Also, what I am trying to do when querying requires building complex filter conditions, unlike the examples here, so that's why I was wondering if I could use expressions, similar to what is shown for the Java version here.
The text was updated successfully, but these errors were encountered:
I want to load an NHibernate entity from a DB, push it to an OpenSearch node for indexing, and then query OpenSearch using C# expressions.
Is that possible, and are there any examples for that (mainly the OpenSearch part)?
I was looking at the tests and I was hoping it would be something like this, but there is an apparent problem: I have not specified the OpenSearch Url anywhere (
nhSession
is the session towards the DB):Is it possible to get an
ISession
that points to an OpenSearch node or cluster, instead of a relational DB?It would be nice to have some sample code in the README page.
Also, what I am trying to do when querying requires building complex filter conditions, unlike the examples here, so that's why I was wondering if I could use expressions, similar to what is shown for the Java version here.
The text was updated successfully, but these errors were encountered: