[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-777?pag...
]
Nikita D commented on HSEARCH-777:
----------------------------------
Hi Sanne,
What I'd like to do is differentiate between errors that happen during an incremental
index update (triggered by the Hb Search event listener) vs explicit calls to make changes
to the index. Here are some use cases:
* I would like to provide an administrative UI where the user can click a button to
re-create the entire search index. If there is an error during this re-indexing, I want to
display an appropriate error message. At the same time, if there is an error indexing an
individual update triggered by the event listener, I would like to just log it as a
warning, not an error.
* The app can be configured to re-create the search index on app server startup. If
indexing fails on startup, I want to get an error. On the other hand the automatic
indexing of incremental updates should still just log a warning if an error occurs.
Right now, if I make an explicit call to FullTextSession (for example, purgeAll) and a
Lucene error occurs, my custom ErrorHandler is invoked, but there is no way for me to know
whether the failing operation was triggered by an explicit call from my own code, or that
it's an update coming from the Hb Search event listener.
Hope this makes sense. Thank you,
Nikita
The ErrorContext passed into ErrorHandler should include a flag
indicating whether it's running in batch mode
-------------------------------------------------------------------------------------------------------------
Key: HSEARCH-777
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-777
Project: Hibernate Search
Issue Type: Improvement
Components: integration
Affects Versions: 3.4.0.Final
Reporter: Nikita D
Priority: Minor
Hibernate Search allows defining a custom error handler for indexing errors (implements
org.hibernate.search.exception.ErrorHandler). The ErrorHandler receives an ErrorContext
with metadata about the error.
It would be very useful to add the following method to the ErrorContext passed into the
ErrorHandler:
{code}
boolean isBatchMode();
{code}
This way a custom error handler can deal with errors that occur during a batch operation
differently from regular operations.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira