-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Possible to modify indexing behavior on a per session basis?
PostPosted: Wed Dec 15, 2010 3:18 pm 
Beginner
Beginner

Joined: Fri Jan 29, 2010 8:17 pm
Posts: 20
Location: Portland OR
I frequently want to have bulk operations do zero indexing incrementally, but I want the default behavior to be to index incrementally via sync or async via in memory queue.

It seems like the only options are global configurations of none/async/sync, and more fine grained async options. But usually I want the default to be incremental indexing via sync(or async via in memory queue).

Looking at the javadoc, there appears to be no way to say someFullTextSession.setIndexingMode(none/async/sync);

Or am I missing something?

I'm currently running into an issue where I'm using a JTATransaction manager + using the Spring transaction API's, where I'm committing, then I get a lazy init exception around:

Daemon Thread [ImportThread_ImportTaskID_53] (Suspended (exception LazyInitializationException))
JavassistLazyInitializer(AbstractLazyInitializer).initialize() line: 167
JavassistLazyInitializer(AbstractLazyInitializer).getImplementation() line: 215
DocumentBuilderIndexedEntity<T>.unproxy(Object) line: 533
DocumentBuilderIndexedEntity<T>.buildDocumentFields(Object, Document, PropertiesMetadata, Map<String,String>, Set<String>) line: 425
DocumentBuilderIndexedEntity<T>.buildDocumentFields(Object, Document, PropertiesMetadata, Map<String,String>, Set<String>) line: 484
DocumentBuilderIndexedEntity<T>.buildDocumentFields(Object, Document, PropertiesMetadata, Map<String,String>, Set<String>) line: 484
DocumentBuilderIndexedEntity<T>.buildDocumentFields(Object, Document, PropertiesMetadata, Map<String,String>, Set<String>) line: 484
DocumentBuilderIndexedEntity<T>.getDocument(T, Serializable, Map<String,String>) line: 414
DocumentBuilderIndexedEntity<T>.createAddWork(Class<T>, T, Serializable, String, boolean) line: 364
DocumentBuilderIndexedEntity<T>.addWorkToQueue(Class<T>, T, Serializable, WorkType, List<LuceneWork>, SearchFactoryImplementor) line: 348
BatchedQueueingProcessor.addWorkToBuilderQueue(List<LuceneWork>, Work<T>) line: 264
BatchedQueueingProcessor.processWorkByLayer(List<Work>, int, List<LuceneWork>, Layer) line: 251
BatchedQueueingProcessor.prepareWorks(WorkQueue) line: 149
PostTransactionWorkQueueSynchronization.beforeCompletion() line: 85
EventSourceTransactionContext$DelegateToSynchronizationOnBeforeTx.doBeforeTransactionCompletion(SessionImplementor) line: 159
ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion() line: 533
ActionQueue.beforeTransactionCompletion() line: 210
SessionImpl.beforeTransactionCompletion(Transaction) line: 563
JDBCContext.beforeTransactionCompletion(Transaction) line: 229
CacheSynchronization.beforeCompletion() line: 96
Sync2Sync.beforeCompletion() line: 73
TxActiveStateHandler(TransactionStateHandler).commit() line: 253
CompositeTransactionImp.doCommit() line: 511
CompositeTerminatorImp.commit() line: 138
TransactionImp.commit() line: 317
TransactionManagerImp.commit() line: 613
UserTransactionImp.commit() line: 168
JtaTransactionManager.doCommit(DefaultTransactionStatus) line: 1009
JtaTransactionManager(AbstractPlatformTransactionManager).processCommit(DefaultTransactionStatus) line: 754
JtaTransactionManager(AbstractPlatformTransactionManager).commit(TransactionStatus) line: 723
SpringTxUtil.commit(TransactionStatus, PlatformTransactionManager) line: 49

So far I haven't been able to track down why the session is null, since the commit has not yet finished. It just happens to be that the code around this is a good candidate to disable incremental indexing, and I would do that to work around this issue, but the option seems to again be unavailable.

Is this, per session indexing mode control, not possible? If not is it being considered?

Any ideas on the issue I'm attempting to work around would also be appreciated.

Thx.


Top
 Profile  
 
 Post subject: Re: Possible to modify indexing behavior on a per session basis?
PostPosted: Wed Dec 15, 2010 9:52 pm 
Beginner
Beginner

Joined: Fri Jan 29, 2010 8:17 pm
Posts: 20
Location: Portland OR
I'll post on a different thread about the LazyInitializationException. But my question still stands about being able to change indexing behavior on a per session basis.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.