> Should we trigger an automatic re-index?

Got the point, this could be a good idea but:

 - this would be a lucene specific feature IMO
 - starting a heavy task on admin behalf can lead to unwanted heavy duty jobs 
running  - without indication on volumetry, expected indxing time etc sizing 
the paralelism of the reindexing would be tricky - One might live without 
index... (especially on top of implementations allowing search overrides).

>  should we finish the operation with the explicit "commit" operation?
+1 

We could add a `postReindexing()` method for search indexes which commits for 
Lucene and noop for Opensearch + scanning.

Then calling it in reindexing task would be a no brainer.

Do you think you can contribute this?-- 

Best regards,

Benoit TELLIER

General manager of Linagora VIETNAM.
Product owner for Team-Mail product.
Chairman of the Apache James project.

Mail: btell...@linagora.com
Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal)


On Aug 17, 2024 5:55 PM, from Wojtek Hi,
(followup to discussions and comments from
github.com/apache/james-project/pull/2373#issuecomment-2293024760)

There was a topic how to handle startup when the search index (in this 
particular case handled by
Lucene) is empty. Should we trigger an automatic re-index? I'd argue that it 
would be sensible as
without it server may return invalid data (without manually triggering reindex 
using REST).

Regarding reindexing via REST - another point/question: should we finish the 
operation with the 
explicit "commit" operation? It may be less relevant with OpenSearch but in 
case of Lucene, until
commit data is not written/flushed to disk from what I understand. IMHO doing 
`.commig()` after
reindex seems sensible. What's more, with reindexing whole database it wouldn't 
impact/be a problem
during shutdown (under certain circumstances the shutdown grace period may be 
short and the
commit/write of the data may not fit during that time)


--
Wojtek


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org


Reply via email to