oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.36k stars 747 forks source link

file events based reindexing #3033

Closed vladak closed 1 year ago

vladak commented 4 years ago

Is your feature request related to a problem? Please describe. A discussion on HN (https://news.ycombinator.com/item?id=22160572) about custom search engine (https://beepb00p.xyz/pkm-search.html) mentioned real-time inotify based indexing. It sounds like a useful addition to me.

Describe the solution you'd like Given the the webapp can already generate xrefs on the fly it should not be such a problem to teach it how to renegerate Lucene document(s). Use https://docs.oracle.com/javase/8/docs/api/java/nio/file/WatchService.html or such to gather the events. Also might as well introduce a simple RESTful API point to allow user/admin to reindex a file on demand.

Alternative solutions Make the Indexer a daemon, separate from web app.

Additional context The history will need to be handled differently or not handled at all. The primary target is local workspace under development.

vladak commented 1 year ago

Not sure this is practical, esp. with history based reindex.