nhibernate.search

Error using NHibernate

蓝咒 提交于 2020-01-24 17:47:07
问题 Considering this example as a base example. I created the application but when I execute this application getting the following error. The ProxyFactoryFactory was not configured. Initialize 'proxyfactory.factory_class' property of the session-factory configuration section with one of the available NHibernate.ByteCode providers. Example: NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu Example: NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle

Lucene.NET indexes are not updating when dealing with many-to-many relationships using NHibernate.Search

无人久伴 提交于 2020-01-01 19:38:10
问题 I have integrated NHibernate.Search into my web app by following tutorials from the following sources: NHibernate.Search using Lucene.NET Full Text Index (Part 1) Using NHibernate.Search with ActiveRecord I have also successfully batch-indexed my database, and when testing against Luke, I can search for terms that reside in whatever entities I marked as indexable. However , when I attempt to update many-to-many entities via my web app, my parent index does not seem to update. For example:

nHibernate.Search with nHibernate v2

醉酒当歌 提交于 2020-01-01 14:39:31
问题 I having trouble getting nHibernate.Search to create an Index. If I use 1.2.1.4 of nHibernate.dll & nHibernate.Search.dll then the index is created correctly and I can inspect it with Luke (a Lucene utility). A segments file is created as well as a Fragments file etc However, when I use v 2 of nHibernate.dll & nHibernate.Search.dll then the index is not created correctly. Only a 1k segments file is created in the Index directory and Luke is unable to inspect it. The code I used in v1 was as

Using several database setups with Lucene.Net

牧云@^-^@ 提交于 2019-12-25 09:35:36
问题 Hi I am developing a search function for an web application with Lucene.Net and NHibernate.Search. The application is used by a lots of companies but is runned as a single service, using different databases for different companies. Therefore I would need an index directory for each database rather than one directory for the entire application. Is there a way of achieve this in Lucene.Net? I have also considering storing the indexes for each company in there respecitive database but havent

Using several database setups with Lucene.Net

大城市里の小女人 提交于 2019-12-25 09:30:04
问题 Hi I am developing a search function for an web application with Lucene.Net and NHibernate.Search. The application is used by a lots of companies but is runned as a single service, using different databases for different companies. Therefore I would need an index directory for each database rather than one directory for the entire application. Is there a way of achieve this in Lucene.Net? I have also considering storing the indexes for each company in there respecitive database but havent

Lucene.NET through NHibernate.Search and POCO Entities

荒凉一梦 提交于 2019-12-22 01:28:18
问题 Is there anyway to keep true POCO Entities while working with Lucene.NET through NHibernate.Search ? It seems that Lucene.NET (NHibernate.Search) mapping only work with Attributes within Entity classes. 回答1: Actually this was true, not too long ago. However, there are different mapping providers out there. Take a look into the source code for the Mapping namespace. You will have to build your own provider but it is possible. 来源: https://stackoverflow.com/questions/2356593/lucene-net-through

IFullTextQuery - exception if there are too may objects

怎甘沉沦 提交于 2019-12-13 05:00:07
问题 This code works fine: Query query = parser.Parse(expression); IFullTextSession session = Search.CreateFullTextSession(this.Session); IFullTextQuery fullTextQuery = session.CreateFullTextQuery(query, new[] { typeof(MappedSequence) }); var l1 = fullTextQuery.List(); as long as the query does not return too many objects. If the query contains too many objects the generated sql code is too long and sql server throws an exception. One working solution is to obtain all objects using paging which is

how do i filter my lucene search results?

邮差的信 提交于 2019-12-12 16:08:55
问题 Say my requirement is "search for all users by name, who are over 18" If i were using SQL, i might write something like: Select * from [Users] Where ([firstname] like '%' + @searchTerm + '%' OR [lastname] like '%' + @searchTerm + '%') AND [age] >= 18 However, im having difficulty translating this into lucene.net. This is what i have so far: var parser = new MultiFieldQueryParser({ "firstname", "lastname"}, new StandardAnalyser()); var luceneQuery = parser.Parse(searchterm) var query =

A correct way to load entities by Id list when Id is not mapped

不问归期 提交于 2019-12-12 05:39:40
问题 I have the following code string idName = builder.IdentifierName; Disjunction disjunction = Restrictions.Disjunction(); IList ids = new ArrayList(entityInfos.Length); foreach (var entityInfo in entityInfos) { ids.Add(entityInfo .Id); } disjunction.Add(Restrictions.In(idName, ids)); criteria.Add(disjunction); criteria.List(); (I haven't written it, it's simplified code from NHibernate.Search) Value of idName is correct ( "Id" ). In my mapping I do not have Id mapped to an entity property, it

Lucene 'join' how-to?

只愿长相守 提交于 2019-12-12 02:59:23
问题 Using Nhibernate.Search at the moment. Some code for context: [Indexed] class foo { [DocumentId] int id {get;set;} bar bar {get;set;} } [Indexed] class bar { [DocumentId] int id {get;set;} } Question: How to retrieve all foos where foo.bar.id==1 using IFullTextQuery? 回答1: If you want to include related information into the foo index you may look into the IndexedEmbeddedAttribute. This will allow you to query for relationships such as if there was a Name property on the bar object you could