[hibernate-dev] [Search] Lazy initialization vs HSearch - Round 4

2012-12-10 Thread Guillaume Smet
Hi, Well, this time, I'm not sure we will be able to win the round by ourselves so I'm asking for advice and guidance... Following our recent patch submissions on the subject, we have one problem left: when we're doing a mass import (note: this mass import is really part of the application so we

Re: [hibernate-dev] [Search] Lazy initialization vs HSearch - Round 4

2012-12-10 Thread Sanne Grinovero
Hi Guillaume, did you try to flush indexes before clearing the session? fullTextSession.flushToIndexes(); fullTextSession.clear(); Sanne On 10 December 2012 18:41, Guillaume Smet wrote: > Hi, > > Well, this time, I'm not sure we will be able to win the round by > ourselves so I'm asking

Re: [hibernate-dev] [Search] Lazy initialization vs HSearch - Round 4

2012-12-10 Thread Guillaume Smet
Hi Sanne, On Mon, Dec 10, 2012 at 7:49 PM, Sanne Grinovero wrote: > did you try to flush indexes before clearing the session? > > fullTextSession.flushToIndexes(); > fullTextSession.clear(); Hmmm, no, we didn't. That's probably what we missed... Is it transactionally safe? Thanks for y

Re: [hibernate-dev] [Search] Lazy initialization vs HSearch - Round 4

2012-12-10 Thread Guillaume Smet
On Mon, Dec 10, 2012 at 8:27 PM, Guillaume Smet wrote: > Is it transactionally safe? >From what I read, it's not. Do you see any way to get this type of pattern working in a transactionally safe way? -- Guillaume ___ hibernate-dev mailing list hibern

Re: [hibernate-dev] [Search] Lazy initialization vs HSearch - Round 4

2012-12-10 Thread Guillaume Smet
On Mon, Dec 10, 2012 at 9:07 PM, Guillaume Smet wrote: > On Mon, Dec 10, 2012 at 8:27 PM, Guillaume Smet > wrote: >> Is it transactionally safe? > > From what I read, it's not. > > Do you see any way to get this type of pattern working in a > transactionally safe way? Hmmm, just handwaving at th

Re: [hibernate-dev] [Search] Lazy initialization vs HSearch - Round 4

2012-12-17 Thread Emmanuel Bernard
My initial reaction is if you really need transactional consistency is to do run a transaction commit every n operations. But that may not be ok for your application. We could imagine more or less what you are describing. This is an idea we want to explore to offer consistency between the index

Re: [hibernate-dev] [Search] Lazy initialization vs HSearch - Round 4

2012-12-17 Thread Sanne Grinovero
There are at least 2 different approaches: #1 What Emmanuel describes is to write in a structure which allows for queries as well, so to be able to include uncommitted changes in queries. It should be possible to pick such a structure in a way which could - make use of temporary storage out of me

Re: [hibernate-dev] [Search] Lazy initialization vs HSearch - Round 4

2012-12-17 Thread Guillaume Smet
Hi Emmanuel, Sanne, On Mon, Dec 17, 2012 at 12:25 PM, Sanne Grinovero wrote: > 2# > I didn't see Guillaume asking about queries, so assuming he would just > need a large write buffer where to keep the current Documents; this is > a simpler patch as we already do build such a plan during any index